Skip to content

Commit

Permalink
Fix x86_64-apple-tvos 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 79eedef commit d2a3784
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions compiler/rustc_target/src/spec/apple/tests.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
use crate::spec::{aarch64_apple_ios_sim, aarch64_apple_watchos_sim, x86_64_apple_ios};
use crate::spec::{
aarch64_apple_ios_sim, aarch64_apple_watchos_sim, x86_64_apple_ios, x86_64_apple_tvos,
};

#[test]
fn simulator_targets_set_abi() {
let all_sim_targets = [
x86_64_apple_ios::target(),
x86_64_apple_tvos::target(),
aarch64_apple_ios_sim::target(),
// Note: There is currently no ARM64 tvOS simulator target
aarch64_apple_watchos_sim::target(),
// TODO: x86_64-apple-tvos and x86_64-apple-watchos-sim
// TODO: x86_64-apple-watchos-sim
];

for target in all_sim_targets {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/x86_64_apple_tvos.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("tvos", Arch::X86_64);
let base = opts("tvos", Arch::X86_64_sim);
Target {
llvm_target: "x86_64-apple-tvos".into(),
pointer_width: 64,
Expand Down

0 comments on commit d2a3784

Please sign in to comment.