]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/aarch64_apple_darwin.rs
Auto merge of #97800 - pnkfelix:issue-97463-fix-aarch64-call-abi-does-not-zeroext...
[rust.git] / compiler / rustc_target / src / spec / aarch64_apple_darwin.rs
1 use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
2
3 pub fn target() -> Target {
4     let arch = "arm64";
5     let mut base = super::apple_base::opts("macos", arch, "");
6     base.cpu = "apple-a14".into();
7     base.max_atomic_width = Some(128);
8
9     // FIXME: The leak sanitizer currently fails the tests, see #88132.
10     base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::THREAD;
11
12     base.link_env_remove.to_mut().extend(super::apple_base::macos_link_env_remove());
13
14     // Clang automatically chooses a more specific target based on
15     // MACOSX_DEPLOYMENT_TARGET.  To enable cross-language LTO to work
16     // correctly, we do too.
17     let llvm_target = super::apple_base::macos_llvm_target(arch);
18
19     Target {
20         llvm_target: llvm_target.into(),
21         pointer_width: 64,
22         data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
23         arch: "aarch64".into(),
24         options: TargetOptions {
25             mcount: "\u{1}mcount".into(),
26             frame_pointer: FramePointer::NonLeaf,
27             ..base
28         },
29     }
30 }