Skip to content

Commit

Permalink
Print out env vars related to Rust on (sufficiently verbose) rustc in…
Browse files Browse the repository at this point in the history
…vocations.

Fix issue 38686.

(update: placated tidy.)
  • Loading branch information
pnkfelix committed Feb 22, 2021
1 parent 15598a8 commit 9fafffd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ fn main() {
}

if verbose > 1 {
let rust_env_vars =
env::vars().filter(|(k, _)| k.starts_with("RUST") || k.starts_with("CARGO"));
for (i, (k, v)) in rust_env_vars.enumerate() {
eprintln!("rustc env[{}]: {:?}={:?}", i, k, v);
}
eprintln!("rustc working directory: {}", env::current_dir().unwrap().display());
eprintln!(
"rustc command: {:?}={:?} {:?}",
bootstrap::util::dylib_path_var(),
Expand Down

0 comments on commit 9fafffd

Please sign in to comment.