about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 49eaed4c67a..804b56e7505 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -914,4 +914,12 @@ impl<'a> Compiler<'a> {
     fn is_snapshot(&self, build: &Build) -> bool {
         self.stage == 0 && self.host == build.config.build
     }
+
+    /// Returns if this compiler is to be treated as a final stage one, whether
+    /// we're performing a full bootstrap or not. Don't do that by comparing
+    /// stages with `2`!
+    fn is_final_stage(&self, build: &Build) -> bool {
+        let final_stage = if build.config.full_bootstrap { 2 } else { 1 };
+        self.stage >= final_stage
+    }
 }