diff options
| author | Wang Xuerui <git@xen0n.name> | 2016-12-31 14:29:27 +0800 |
|---|---|---|
| committer | Wang Xuerui <git@xen0n.name> | 2016-12-31 14:29:34 +0800 |
| commit | 8d5b91a19f0992445a6b19f7c774cdeb54b7632a (patch) | |
| tree | ee2a1ccd0757b997e4d9405ca65f567b26ded5f7 | |
| parent | b68d3293e34fd2be7f61881a2e0733bbbce97619 (diff) | |
| download | rust-8d5b91a19f0992445a6b19f7c774cdeb54b7632a.tar.gz rust-8d5b91a19f0992445a6b19f7c774cdeb54b7632a.zip | |
rustbuild: check if compiler is final stage wrt the full bootstrap setting
| -rw-r--r-- | src/bootstrap/lib.rs | 8 |
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 + } } |
