Skip to content

Commit 9fafffd

Browse files
committed
Print out env vars related to Rust on (sufficiently verbose) rustc invocations.
Fix issue 38686. (update: placated tidy.)
1 parent 15598a8 commit 9fafffd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bootstrap/bin/rustc.rs

+6
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ fn main() {
139139
}
140140

141141
if verbose > 1 {
142+
let rust_env_vars =
143+
env::vars().filter(|(k, _)| k.starts_with("RUST") || k.starts_with("CARGO"));
144+
for (i, (k, v)) in rust_env_vars.enumerate() {
145+
eprintln!("rustc env[{}]: {:?}={:?}", i, k, v);
146+
}
147+
eprintln!("rustc working directory: {}", env::current_dir().unwrap().display());
142148
eprintln!(
143149
"rustc command: {:?}={:?} {:?}",
144150
bootstrap::util::dylib_path_var(),

0 commit comments

Comments
 (0)