]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_target/src/spec/aarch64_apple_ios.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.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,
14 pointer_width: 64,
15 data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(),
16 arch: "aarch64".to_string(),
17 options: TargetOptions {
18 features: "+neon,+fp-armv8,+apple-a7".to_string(),
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 .to_string(),
33 ..opts("ios", Arch::Arm64)
34 },
35 }
36 }