about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl/src
diff options
context:
space:
mode:
authorMads Marquart <mads@marquart.dk>2024-11-14 17:43:52 +0100
committerMads Marquart <mads@marquart.dk>2024-11-22 20:46:05 +0100
commit431c500c6071008a00b63db1936af8516b5863ef (patch)
treebfeb352e073b7dcb9168a599a0ef992486e4406a /compiler/rustc_driver_impl/src
parenta47555110cf09b3ed59811d9b02235443e76a595 (diff)
downloadrust-431c500c6071008a00b63db1936af8516b5863ef.tar.gz
rust-431c500c6071008a00b63db1936af8516b5863ef.zip
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.
Diffstat (limited to 'compiler/rustc_driver_impl/src')
-rw-r--r--compiler/rustc_driver_impl/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs
index c270ce16726..6d8a321536b 100644
--- a/compiler/rustc_driver_impl/src/lib.rs
+++ b/compiler/rustc_driver_impl/src/lib.rs
@@ -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)]