Skip to content

Commit ffccfa1

Browse files
committed
Fix x86_64-apple-watchos-sim target to use the correct target_abi
1 parent d2a3784 commit ffccfa1

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

compiler/rustc_target/src/spec/apple/tests.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
use crate::spec::{
22
aarch64_apple_ios_sim, aarch64_apple_watchos_sim, x86_64_apple_ios, x86_64_apple_tvos,
3+
x86_64_apple_watchos_sim,
34
};
45

56
#[test]
67
fn simulator_targets_set_abi() {
78
let all_sim_targets = [
89
x86_64_apple_ios::target(),
910
x86_64_apple_tvos::target(),
11+
x86_64_apple_watchos_sim::target(),
1012
aarch64_apple_ios_sim::target(),
1113
// Note: There is currently no ARM64 tvOS simulator target
1214
aarch64_apple_watchos_sim::target(),
13-
// TODO: x86_64-apple-watchos-sim
1415
];
1516

1617
for target in all_sim_targets {

compiler/rustc_target/src/spec/apple_sdk_base.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub enum Arch {
1515
Arm64,
1616
Arm64_32,
1717
I386,
18+
#[allow(dead_code)] // Some targets don't use this enum...
1819
X86_64,
1920
X86_64_sim,
2021
X86_64_macabi,

compiler/rustc_target/src/spec/x86_64_apple_watchos_sim.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::apple_sdk_base::{opts, Arch};
22
use crate::spec::{StackProbeType, Target, TargetOptions};
33

44
pub fn target() -> Target {
5-
let base = opts("watchos", Arch::X86_64);
5+
let base = opts("watchos", Arch::X86_64_sim);
66

77
let arch = "x86_64";
88
let llvm_target = super::apple_base::watchos_sim_llvm_target(arch);

0 commit comments

Comments
 (0)