]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/aarch64_apple_ios.rs
Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into sync_cg_clif-2022-10-23
[rust.git] / compiler / rustc_target / src / spec / aarch64_apple_ios.rs
1 use super::apple_sdk_base::{opts, Arch};
2 use crate::spec::{FramePointer, Target, TargetOptions};
3
4 pub fn target() -> Target {
5     // Clang automatically chooses a more specific target based on
6     // IPHONEOS_DEPLOYMENT_TARGET.
7     // This is required for the target to pick the right
8     // MACH-O commands, so we do too.
9     let arch = "arm64";
10     let llvm_target = super::apple_base::ios_llvm_target(arch);
11
12     Target {
13         llvm_target: llvm_target.into(),
14         pointer_width: 64,
15         data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
16         arch: "aarch64".into(),
17         options: TargetOptions {
18             features: "+neon,+fp-armv8,+apple-a7".into(),
19             max_atomic_width: Some(128),
20             forces_embed_bitcode: true,
21             frame_pointer: FramePointer::NonLeaf,
22             // Taken from a clang build on Xcode 11.4.1.
23             // These arguments are not actually invoked - they just have
24             // to look right to pass App Store validation.
25             bitcode_llvm_cmdline: "-triple\0\
26                 arm64-apple-ios11.0.0\0\
27                 -emit-obj\0\
28                 -disable-llvm-passes\0\
29                 -target-abi\0\
30                 darwinpcs\0\
31                 -Os\0"
32                 .into(),
33             ..opts("ios", Arch::Arm64)
34         },
35     }
36 }