From d2a37847809bc3df86afb4c65b5fe5f06d99ce20 Mon Sep 17 00:00:00 2001 From: BlackHoleFox Date: Sun, 23 Oct 2022 15:33:01 -0500 Subject: [PATCH] Fix x86_64-apple-tvos target to use the correct target_abi --- compiler/rustc_target/src/spec/apple/tests.rs | 8 ++++++-- compiler/rustc_target/src/spec/x86_64_apple_tvos.rs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_target/src/spec/apple/tests.rs b/compiler/rustc_target/src/spec/apple/tests.rs index 23bfb95c198..b45e6e309c1 100644 --- a/compiler/rustc_target/src/spec/apple/tests.rs +++ b/compiler/rustc_target/src/spec/apple/tests.rs @@ -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 { diff --git a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs index 3d54da0867c..c1fd8e1c8b9 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs @@ -2,7 +2,7 @@ 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,