]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/aarch64_apple_darwin.rs
Fix invalid float literal suggestions when recovering an integer
[rust.git] / compiler / rustc_target / src / spec / aarch64_apple_darwin.rs
1 use super::apple_base::{macos_llvm_target, opts, Arch};
2 use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
3
4 pub fn target() -> Target {
5     let arch = Arch::Arm64;
6     let mut base = opts("macos", arch);
7     base.cpu = "apple-a14".into();
8     base.max_atomic_width = Some(128);
9
10     // FIXME: The leak sanitizer currently fails the tests, see #88132.
11     base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::THREAD;
12
13     Target {
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         llvm_target: macos_llvm_target(arch).into(),
18         pointer_width: 64,
19         data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
20         arch: arch.target_arch(),
21         options: TargetOptions {
22             mcount: "\u{1}mcount".into(),
23             frame_pointer: FramePointer::NonLeaf,
24             ..base
25         },
26     }
27 }