mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
rustbuild: check if compiler is final stage wrt the full bootstrap setting
This commit is contained in:
parent
b68d3293e3
commit
8d5b91a19f
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user