]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/x86_64_apple_watchos_sim.rs
:arrow_up: rust-analyzer
[rust.git] / compiler / rustc_target / src / spec / x86_64_apple_watchos_sim.rs
1 use super::apple_sdk_base::{opts, Arch};
2 use crate::spec::{StackProbeType, Target, TargetOptions};
3
4 pub fn target() -> Target {
5     let base = opts("watchos", Arch::X86_64_sim);
6
7     let arch = "x86_64";
8     let llvm_target = super::apple_base::watchos_sim_llvm_target(arch);
9
10     Target {
11         llvm_target: llvm_target.into(),
12         pointer_width: 64,
13         data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
14             .into(),
15         arch: "x86_64".into(),
16         options: TargetOptions {
17             max_atomic_width: Some(64),
18             stack_probes: StackProbeType::X86,
19             forces_embed_bitcode: true,
20             // Taken from a clang build on Xcode 11.4.1.
21             // These arguments are not actually invoked - they just have
22             // to look right to pass App Store validation.
23             bitcode_llvm_cmdline: "-triple\0\
24                 x86_64-apple-watchos5.0-simulator\0\
25                 -emit-obj\0\
26                 -disable-llvm-passes\0\
27                 -target-abi\0\
28                 darwinpcs\0\
29                 -Os\0"
30                 .into(),
31             ..base
32         },
33     }
34 }