Skip to content

Commit d60905b

Browse files
committed
Initial target specification for aarch64-apple-tvos-sim
1 parent 0a199e4 commit d60905b

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
use super::apple_base::{opts, tvos_sim_llvm_target, Arch};
2+
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
3+
4+
pub fn target() -> Target {
5+
let arch = Arch::Arm64_sim;
6+
let mut base = opts("ios", arch);
7+
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
8+
Target {
9+
llvm_target: tvos_sim_llvm_target(arch).into(),
10+
pointer_width: 64,
11+
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
12+
arch: arch.target_arch(),
13+
options: TargetOptions {
14+
features: "+neon,+fp-armv8,+apple-a7".into(),
15+
max_atomic_width: Some(128),
16+
forces_embed_bitcode: true,
17+
frame_pointer: FramePointer::NonLeaf,
18+
// Taken from (and slightly modified) the aarch64-apple-ios-sim spec which says:
19+
// Taken from a clang build on Xcode 11.4.1.
20+
// These arguments are not actually invoked - they just have
21+
// to look right to pass App Store validation.
22+
bitcode_llvm_cmdline: "-triple\0\
23+
arm64-apple-tvos14.0-simulator\0\
24+
-emit-obj\0\
25+
-disable-llvm-passes\0\
26+
-target-abi\0\
27+
darwinpcs\0\
28+
-Os\0"
29+
.into(),
30+
..base
31+
},
32+
}
33+
}

compiler/rustc_target/src/spec/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1396,6 +1396,7 @@ supported_targets! {
13961396
("aarch64-apple-ios-macabi", aarch64_apple_ios_macabi),
13971397
("aarch64-apple-ios-sim", aarch64_apple_ios_sim),
13981398
("aarch64-apple-tvos", aarch64_apple_tvos),
1399+
("aarch64-apple-tvos-sim", aarch64_apple_tvos_sim),
13991400
("x86_64-apple-tvos", x86_64_apple_tvos),
14001401

14011402
("armv7k-apple-watchos", armv7k_apple_watchos),

0 commit comments

Comments
 (0)