]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_target/src/spec/aarch64_apple_watchos_sim.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / aarch64_apple_watchos_sim.rs
1 use super::apple_sdk_base::{opts, Arch};
2 use crate::spec::{FramePointer, Target, TargetOptions};
3
4 pub fn target() -> Target {
5 let base = opts("watchos", Arch::Arm64_sim);
6
7 // Clang automatically chooses a more specific target based on
8 // WATCHOS_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::watchos_sim_llvm_target(arch);
13
14 Target {
15 llvm_target: llvm_target.into(),
16 pointer_width: 64,
17 data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(),
18 arch: "aarch64".into(),
19 options: TargetOptions {
20 features: "+neon,+fp-armv8,+apple-a7".into(),
21 max_atomic_width: Some(128),
22 forces_embed_bitcode: true,
23 frame_pointer: FramePointer::NonLeaf,
24 // Taken from a clang build on Xcode 11.4.1.
25 // These arguments are not actually invoked - they just have
26 // to look right to pass App Store validation.
27 bitcode_llvm_cmdline: "-triple\0\
28 arm64-apple-watchos5.0-simulator\0\
29 -emit-obj\0\
30 -disable-llvm-passes\0\
31 -target-abi\0\
32 darwinpcs\0\
33 -Os\0"
34 .into(),
35 ..base
36 },
37 }
38 }