1 use crate::spec::TargetOptions;
2 use crate::spec::{FramePointer, LinkerFlavor, SanitizerSet, StackProbeType, Target};
4 pub fn target() -> Target {
5 let mut base = super::apple_base::opts("macos");
6 base.cpu = "core2".into();
7 base.max_atomic_width = Some(128); // core2 support cmpxchg16b
8 base.frame_pointer = FramePointer::Always;
10 .insert(LinkerFlavor::Gcc, vec!["-m64".into(), "-arch".into(), "x86_64".into()]);
11 base.link_env_remove.to_mut().extend(super::apple_base::macos_link_env_remove());
12 // don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
13 base.stack_probes = StackProbeType::Call;
14 base.supported_sanitizers =
15 SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::LEAK | SanitizerSet::THREAD;
17 // Clang automatically chooses a more specific target based on
18 // MACOSX_DEPLOYMENT_TARGET. To enable cross-language LTO to work
19 // correctly, we do too.
21 let llvm_target = super::apple_base::macos_llvm_target(&arch);
24 llvm_target: llvm_target.into(),
26 data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
29 options: TargetOptions { mcount: "\u{1}mcount".into(), ..base },