]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_target/src/spec/aarch64_apple_ios_sim.rs
New upstream version 1.69.0+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / aarch64_apple_ios_sim.rs
CommitLineData
487cf647 1use super::apple_base::{ios_sim_llvm_target, opts, Arch};
9ffffee4 2use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
6a06907d
XL
3
4pub fn target() -> Target {
487cf647 5 let arch = Arch::Arm64_sim;
9ffffee4
FG
6 let mut base = opts("ios", arch);
7 base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
8
6a06907d 9 Target {
487cf647
FG
10 // Clang automatically chooses a more specific target based on
11 // IPHONEOS_DEPLOYMENT_TARGET.
12 // This is required for the simulator target to pick the right
13 // MACH-O commands, so we do too.
14 llvm_target: ios_sim_llvm_target(arch).into(),
6a06907d 15 pointer_width: 64,
5e7ed085 16 data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
487cf647 17 arch: arch.target_arch(),
6a06907d 18 options: TargetOptions {
5e7ed085 19 features: "+neon,+fp-armv8,+apple-a7".into(),
6a06907d 20 max_atomic_width: Some(128),
6a06907d 21 forces_embed_bitcode: true,
136023e0 22 frame_pointer: FramePointer::NonLeaf,
6a06907d
XL
23 // Taken from a clang build on Xcode 11.4.1.
24 // These arguments are not actually invoked - they just have
25 // to look right to pass App Store validation.
26 bitcode_llvm_cmdline: "-triple\0\
27 arm64-apple-ios14.0-simulator\0\
28 -emit-obj\0\
29 -disable-llvm-passes\0\
30 -target-abi\0\
31 darwinpcs\0\
32 -Os\0"
5e7ed085 33 .into(),
9ffffee4 34 ..base
6a06907d
XL
35 },
36 }
37}