about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMads Marquart <mads@marquart.dk>2024-11-25 08:00:22 +0100
committerMads Marquart <mads@marquart.dk>2025-01-31 04:07:06 +0100
commit0a3fd1f0626167dce2648680300df3c252fe7154 (patch)
tree075505aeb54a108fb4a5f8dd61df34c0f508a676 /src/bootstrap
parent9318fbb33aa85d0467d05159623d0e56ef2e8f3e (diff)
downloadrust-0a3fd1f0626167dce2648680300df3c252fe7154.tar.gz
rust-0a3fd1f0626167dce2648680300df3c252fe7154.zip
Explain why MACOSX_STD_DEPLOYMENT_TARGET exist
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/compile.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs
index f137460e7ea..61f404aecdc 100644
--- a/src/bootstrap/src/core/build_steps/compile.rs
+++ b/src/bootstrap/src/core/build_steps/compile.rs
@@ -474,7 +474,15 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
         // already, rustc should've picked that up).
         cargo.env(env_var.trim(), value.trim());
 
-        // Allow CI to override the deployment target for `std`.
+        // Allow CI to override the deployment target for `std` on macOS.
+        //
+        // This is useful because we might want the host tooling LLVM, `rustc`
+        // and Cargo to have a different deployment target than `std` itself
+        // (currently, these two versions are the same, but in the past, we
+        // supported macOS 10.7 for user code and macOS 10.8 in host tooling).
+        //
+        // It is not necessary on the other platforms, since only macOS has
+        // support for host tooling.
         if let Some(target) = env::var_os("MACOSX_STD_DEPLOYMENT_TARGET") {
             cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
         }