about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdam Gastineau <adam@agg.im>2024-03-19 06:44:35 -0700
committerAdam Gastineau <adam@agg.im>2024-03-19 06:44:35 -0700
commitf32ad2baf47e03effcded82f5f2e17b9cc85e50f (patch)
tree61be273b65f178b509e5390b94ac799754852426
parent51777dc81240f97869b99370dc59dcd541b90b70 (diff)
downloadrust-f32ad2baf47e03effcded82f5f2e17b9cc85e50f.tar.gz
rust-f32ad2baf47e03effcded82f5f2e17b9cc85e50f.zip
Fixed VISIONOS_DEPLOYMENT_TARGET envar test
-rw-r--r--compiler/rustc_target/src/spec/base/apple/mod.rs4
-rw-r--r--compiler/rustc_target/src/spec/base/apple/tests.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_target/src/spec/base/apple/mod.rs b/compiler/rustc_target/src/spec/base/apple/mod.rs
index 33691be7182..9c0bda43c13 100644
--- a/compiler/rustc_target/src/spec/base/apple/mod.rs
+++ b/compiler/rustc_target/src/spec/base/apple/mod.rs
@@ -307,7 +307,7 @@ fn link_env_remove(os: &'static str) -> StaticCow<[StaticCow<str>]> {
         // although this is apparently ignored when using the linker at "/usr/bin/ld".
         env_remove.push("IPHONEOS_DEPLOYMENT_TARGET".into());
         env_remove.push("TVOS_DEPLOYMENT_TARGET".into());
-        env_remove.push("visionos_DEPLOYMENT_TARGET".into());
+        env_remove.push("VISIONOS_DEPLOYMENT_TARGET".into());
         env_remove.into()
     } else {
         // Otherwise if cross-compiling for a different OS/SDK (including Mac Catalyst), remove any part
@@ -375,7 +375,7 @@ pub fn watchos_sim_llvm_target(arch: Arch) -> String {
 
 fn visionos_deployment_target() -> (u32, u32) {
     // If you are looking for the default deployment target, prefer `rustc --print deployment-target`.
-    from_set_deployment_target("XROS_DEPLOYMENT_TARGET").unwrap_or((1, 0))
+    from_set_deployment_target("VISIONOS_DEPLOYMENT_TARGET").unwrap_or((1, 0))
 }
 
 pub fn visionos_llvm_target(arch: Arch) -> String {
diff --git a/compiler/rustc_target/src/spec/base/apple/tests.rs b/compiler/rustc_target/src/spec/base/apple/tests.rs
index 18347037eb7..91da60abb92 100644
--- a/compiler/rustc_target/src/spec/base/apple/tests.rs
+++ b/compiler/rustc_target/src/spec/base/apple/tests.rs
@@ -34,7 +34,7 @@ fn macos_link_environment_unmodified() {
         // for the host.
         assert_eq!(
             target.link_env_remove,
-            crate::spec::cvs!["IPHONEOS_DEPLOYMENT_TARGET", "TVOS_DEPLOYMENT_TARGET"],
+            crate::spec::cvs!["IPHONEOS_DEPLOYMENT_TARGET", "TVOS_DEPLOYMENT_TARGET", "VISIONOS_DEPLOYMENT_TARGET"],
         );
     }
 }