rustc_target/spec/targets/
x86_64h_apple_darwin.rs1use crate::spec::base::apple::{Arch, TargetAbi, base};
2use crate::spec::{FramePointer, SanitizerSet, Target, TargetMetadata, TargetOptions};
3
4pub(crate) fn target() -> Target {
5 let (mut opts, llvm_target, arch) = base("macos", Arch::X86_64h, TargetAbi::Normal);
6 opts.max_atomic_width = Some(128);
7 opts.frame_pointer = FramePointer::Always;
8 opts.supported_sanitizers =
9 SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::LEAK | SanitizerSet::THREAD;
10
11 opts.features = "-rdrnd,-aes,-pclmul,-rtm,-fsgsbase".into();
22 assert_eq!(
25 opts.cpu, "core-avx2",
26 "you need to adjust the feature list in x86_64h-apple-darwin if you change this",
27 );
28
29 Target {
30 llvm_target,
31 metadata: TargetMetadata {
32 description: Some("x86_64 Apple macOS with Intel Haswell+".into()),
33 tier: Some(3),
34 host_tools: Some(true),
35 std: Some(true),
36 },
37 pointer_width: 64,
38 data_layout:
39 "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
40 arch,
41 options: TargetOptions { mcount: "\u{1}mcount".into(), ..opts },
42 }
43}