Skip to content

Commit 8d5b91a

Browse files
committed
rustbuild: check if compiler is final stage wrt the full bootstrap setting
1 parent b68d329 commit 8d5b91a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/bootstrap/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,4 +914,12 @@ impl<'a> Compiler<'a> {
914914
fn is_snapshot(&self, build: &Build) -> bool {
915915
self.stage == 0 && self.host == build.config.build
916916
}
917+
918+
/// Returns if this compiler is to be treated as a final stage one, whether
919+
/// we're performing a full bootstrap or not. Don't do that by comparing
920+
/// stages with `2`!
921+
fn is_final_stage(&self, build: &Build) -> bool {
922+
let final_stage = if build.config.full_bootstrap { 2 } else { 1 };
923+
self.stage >= final_stage
924+
}
917925
}

0 commit comments

Comments
 (0)