about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2018-08-02 08:49:36 +0200
committerMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2018-08-02 08:49:36 +0200
commit66a47182d10542b68773d8a1cb9230a4918a5068 (patch)
tree75f37d8a3547c6426f2a541c92337a727b5d5a53 /src/bootstrap
parentdb5476571d9b27c862b95c1e64764b0ac8980e23 (diff)
downloadrust-66a47182d10542b68773d8a1cb9230a4918a5068.tar.gz
rust-66a47182d10542b68773d8a1cb9230a4918a5068.zip
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

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/builder.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 724d3b74190..dc0b0aaf0bb 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -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 {