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