Skip to content

Commit

Permalink
Fix x86_64-apple-watchos-sim target to use the correct target_abi
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackHoleFox committed Oct 23, 2022
1 parent d2a3784 commit ffccfa1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion compiler/rustc_target/src/spec/apple/tests.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
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]
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 {
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/apple_sdk_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/x86_64_apple_watchos_sim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ffccfa1

Please sign in to comment.