mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +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 @@ fn new(stage: u32, host: &'a str) -> 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 a new issue