]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/aarch64_apple_ios_macabi.rs
Auto merge of #104679 - dvdhrm:rw/dso, r=petrochenkov
[rust.git] / compiler / rustc_target / src / spec / aarch64_apple_ios_macabi.rs
1 use super::apple_base::{opts, Arch};
2 use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, Target, TargetOptions};
3
4 pub fn target() -> Target {
5     let llvm_target = "arm64-apple-ios14.0-macabi";
6
7     let arch = Arch::Arm64_macabi;
8     let mut base = opts("ios", arch);
9     base.add_pre_link_args(LinkerFlavor::Darwin(Cc::Yes, Lld::No), &["-target", llvm_target]);
10
11     Target {
12         llvm_target: llvm_target.into(),
13         pointer_width: 64,
14         data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
15         arch: arch.target_arch(),
16         options: TargetOptions {
17             features: "+neon,+fp-armv8,+apple-a12".into(),
18             max_atomic_width: Some(128),
19             forces_embed_bitcode: true,
20             frame_pointer: FramePointer::NonLeaf,
21             // Taken from a clang build on Xcode 11.4.1.
22             // These arguments are not actually invoked - they just have
23             // to look right to pass App Store validation.
24             bitcode_llvm_cmdline: "-triple\0\
25                 arm64-apple-ios14.0-macabi\0\
26                 -emit-obj\0\
27                 -disable-llvm-passes\0\
28                 -Os\0"
29                 .into(),
30             ..base
31         },
32     }
33 }