Fix x86_64-apple-watchos-sim target to use the correct target_abi

This commit is contained in:
BlackHoleFox 2022-10-23 15:41:07 -05:00
parent d2a3784780
commit ffccfa1eed
3 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,6 @@
use crate::spec::{
aarch64_apple_ios_sim, aarch64_apple_watchos_sim, x86_64_apple_ios, x86_64_apple_tvos,
x86_64_apple_watchos_sim,
};
#[test]
@ -7,10 +8,10 @@ fn simulator_targets_set_abi() {
let all_sim_targets = [
x86_64_apple_ios::target(),
x86_64_apple_tvos::target(),
x86_64_apple_watchos_sim::target(),
aarch64_apple_ios_sim::target(),
// Note: There is currently no ARM64 tvOS simulator target
aarch64_apple_watchos_sim::target(),
// TODO: x86_64-apple-watchos-sim
];
for target in all_sim_targets {

View file

@ -15,6 +15,7 @@ pub enum Arch {
Arm64,
Arm64_32,
I386,
#[allow(dead_code)] // Some targets don't use this enum...
X86_64,
X86_64_sim,
X86_64_macabi,

View file

@ -2,7 +2,7 @@ use super::apple_sdk_base::{opts, Arch};
use crate::spec::{StackProbeType, Target, TargetOptions};
pub fn target() -> Target {
let base = opts("watchos", Arch::X86_64);
let base = opts("watchos", Arch::X86_64_sim);
let arch = "x86_64";
let llvm_target = super::apple_base::watchos_sim_llvm_target(arch);