Skip to content

Commit

Permalink
Rollup merge of rust-lang#52969 - Keruspe:local_rebuild, r=alexcrichton
Browse files Browse the repository at this point in the history
rustbuild: fix local_rebuild

If we detect a local rebuild (e.g. bootstrap compiler is the same version as target compiler), we set stage to 1.
When trying to build e.g. UnstableBook, we use Mode::ToolBootstrap and stage is 1.
Just allow Mode::ToolBootstrap and stagge != 0 if we are in a local_rebuild

This fixes building current master using current beta (as master hasn't yet been bumped to 1.30).
This should be backported to beta too, as currently we cannot build beta using itself because of that.

r? @alexcrichton
  • Loading branch information
cramertj authored Aug 3, 2018
2 parents 1923e0b + 66a4718 commit 1c35e52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ impl<'a> Builder<'a> {
// compiler, but for tools we just use the precompiled libraries that
// we've downloaded
let use_snapshot = mode == Mode::ToolBootstrap;
assert!(!use_snapshot || stage == 0);
assert!(!use_snapshot || stage == 0 || self.local_rebuild);

let maybe_sysroot = self.sysroot(compiler);
let sysroot = if use_snapshot {
Expand Down

0 comments on commit 1c35e52

Please sign in to comment.