diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2021-02-22 11:21:12 -0500 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2021-02-22 11:43:13 -0500 |
| commit | 9fafffd50b50f0c9132dc1098382992b8457cdbb (patch) | |
| tree | 94778e99bb06b109f803a98a96eb127caada07eb | |
| parent | 15598a83db88ec7a32ea18a44dd6309f32edc07e (diff) | |
| download | rust-9fafffd50b50f0c9132dc1098382992b8457cdbb.tar.gz rust-9fafffd50b50f0c9132dc1098382992b8457cdbb.zip | |
Print out env vars related to Rust on (sufficiently verbose) rustc invocations.
Fix issue 38686. (update: placated tidy.)
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 3694bdbf670..7cf4311b985 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -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(), |
