Skip to content

Commit

Permalink
Use the same RUSTFLAGS for building and testing bootstrap
Browse files Browse the repository at this point in the history
Fixes #49215
  • Loading branch information
SimonSapin committed Mar 23, 2018
1 parent cc34ca1 commit e993e62
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1679,6 +1679,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");
}
Expand Down

0 comments on commit e993e62

Please sign in to comment.