Skip to content

Commit ff3dab4

Browse files
committed
Explain why MACOSX_STD_DEPLOYMENT_TARGET exist
1 parent f816d33 commit ff3dab4

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
@@ -507,7 +507,15 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
507507
// already, rustc should've picked that up).
508508
cargo.env(env_var, value);
509509

510-
// Allow CI to override the deployment target for `std`.
510+
// Allow CI to override the deployment target for `std` on macOS.
511+
//
512+
// This is useful because we might want the host tooling LLVM, `rustc`
513+
// and Cargo to have a different deployment target than `std` itself
514+
// (currently, these two versions are the same, but in the past, we
515+
// supported macOS 10.7 for user code and macOS 10.8 in host tooling).
516+
//
517+
// It is not necessary on the other platforms, since only macOS has
518+
// support for host tooling.
511519
if let Some(target) = env::var_os("MACOSX_STD_DEPLOYMENT_TARGET") {
512520
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
513521
}

0 commit comments

Comments
 (0)