Skip to content

Commit

Permalink
Explain why MACOSX_STD_DEPLOYMENT_TARGET exist
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Nov 25, 2024
1 parent f816d33 commit ff3dab4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,15 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
// already, rustc should've picked that up).
cargo.env(env_var, value);

// 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);
}
Expand Down

0 comments on commit ff3dab4

Please sign in to comment.