diff options
| author | bors <bors@rust-lang.org> | 2018-03-23 23:08:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-03-23 23:08:13 +0000 |
| commit | 4be5d360cd8a9338d1408b3998874313240db395 (patch) | |
| tree | bb9eea92e0e4478192822986c1142fc6d413feaf /src/bootstrap | |
| parent | c08480fce0f39f5c9c6db6dde0dccb375ca0ab14 (diff) | |
| parent | e993e6234181b0cc90b2aaa92ffbad4ea5b6a4da (diff) | |
| download | rust-4be5d360cd8a9338d1408b3998874313240db395.tar.gz rust-4be5d360cd8a9338d1408b3998874313240db395.zip | |
Auto merge of #49311 - SimonSapin:bootstrap-vs-rustflags-the-return, r=Mark-Simulacrum
Use the same RUSTFLAGS for building and testing `bootstrap` This avoids recompiling the whole dependency graph twice for every `./x.py test` run. Fixes #49215
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/test.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 6c19da4648a..a5ccbd4ec1b 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1694,6 +1694,12 @@ impl Step for Bootstrap { .env("CARGO_TARGET_DIR", build.out.join("bootstrap")) .env("RUSTC_BOOTSTRAP", "1") .env("RUSTC", &build.initial_rustc); + if let Some(flags) = option_env!("RUSTFLAGS") { + // Use the same rustc flags for testing as for "normal" compilation, + // so that Cargo doesn’t recompile the entire dependency graph every time: + // https://github.com/rust-lang/rust/issues/49215 + cmd.env("RUSTFLAGS", flags); + } if !build.fail_fast { cmd.arg("--no-fail-fast"); } |
