Skip to content

Commit

Permalink
rustbuild: fix local_rebuild
Browse files Browse the repository at this point in the history
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

Signed-off-by: Marc-Antoine Perennou <[email protected]>
  • Loading branch information
Keruspe authored and pietroalbini committed Sep 1, 2018
1 parent 98bedcb commit 1aa4bbb
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 1aa4bbb

Please sign in to comment.