Skip to content

Commit 0a3fd1f

Browse files
committedJan 31, 2025·
Explain why MACOSX_STD_DEPLOYMENT_TARGET exist
1 parent 9318fbb commit 0a3fd1f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎src/bootstrap/src/core/build_steps/compile.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,15 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
474474
// already, rustc should've picked that up).
475475
cargo.env(env_var.trim(), value.trim());
476476

477-
// Allow CI to override the deployment target for `std`.
477+
// Allow CI to override the deployment target for `std` on macOS.
478+
//
479+
// This is useful because we might want the host tooling LLVM, `rustc`
480+
// and Cargo to have a different deployment target than `std` itself
481+
// (currently, these two versions are the same, but in the past, we
482+
// supported macOS 10.7 for user code and macOS 10.8 in host tooling).
483+
//
484+
// It is not necessary on the other platforms, since only macOS has
485+
// support for host tooling.
478486
if let Some(target) = env::var_os("MACOSX_STD_DEPLOYMENT_TARGET") {
479487
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
480488
}

0 commit comments

Comments
 (0)
Please sign in to comment.