Print env var in --print=deployment-target

The deployment target environment variable is OS-specific, and if you're
in a place where you're asking `rustc` for the deployment target, you're
likely to also wanna know the environment variable.
This commit is contained in:
Mads Marquart 2024-11-14 17:43:52 +01:00
parent a47555110c
commit 431c500c60
6 changed files with 29 additions and 18 deletions

View file

@ -875,8 +875,9 @@ fn print_crate_info(
DeploymentTarget => {
if sess.target.is_like_osx {
println_info!(
"deployment_target={}",
apple::pretty_version(apple::deployment_target(sess))
"{}={}",
apple::deployment_target_env_var(&sess.target.os),
apple::pretty_version(apple::deployment_target(sess)),
)
} else {
#[allow(rustc::diagnostic_outside_of_impl)]