|
| 1 | +use super::apple_sdk_base::{opts, Arch}; |
| 2 | +use crate::spec::{Target, TargetOptions}; |
| 3 | + |
| 4 | +pub fn target() -> Target { |
| 5 | + let base = opts("ios", Arch::Arm64_sim); |
| 6 | + |
| 7 | + // Clang automatically chooses a more specific target based on |
| 8 | + // IPHONEOS_DEPLOYMENT_TARGET. |
| 9 | + // This is required for the simulator target to pick the right |
| 10 | + // MACH-O commands, so we do too. |
| 11 | + let arch = "arm64"; |
| 12 | + let llvm_target = super::apple_base::ios_sim_llvm_target(arch); |
| 13 | + |
| 14 | + Target { |
| 15 | + llvm_target: llvm_target, |
| 16 | + pointer_width: 64, |
| 17 | + data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), |
| 18 | + arch: "aarch64".to_string(), |
| 19 | + options: TargetOptions { |
| 20 | + features: "+neon,+fp-armv8,+apple-a7".to_string(), |
| 21 | + eliminate_frame_pointer: false, |
| 22 | + max_atomic_width: Some(128), |
| 23 | + unsupported_abis: super::arm_base::unsupported_abis(), |
| 24 | + forces_embed_bitcode: true, |
| 25 | + // Taken from a clang build on Xcode 11.4.1. |
| 26 | + // These arguments are not actually invoked - they just have |
| 27 | + // to look right to pass App Store validation. |
| 28 | + bitcode_llvm_cmdline: "-triple\0\ |
| 29 | + arm64-apple-ios14.0-simulator\0\ |
| 30 | + -emit-obj\0\ |
| 31 | + -disable-llvm-passes\0\ |
| 32 | + -target-abi\0\ |
| 33 | + darwinpcs\0\ |
| 34 | + -Os\0" |
| 35 | + .to_string(), |
| 36 | + ..base |
| 37 | + }, |
| 38 | + } |
| 39 | +} |
0 commit comments