diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-02-23 23:00:48 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-02-28 10:50:13 -0800 |
| commit | 90d28ec372185f94529fd6c72cc17c9cf1e9f137 (patch) | |
| tree | fad689dedceea6e6d4191b3d35e2159c1ec531cf | |
| parent | 095f5e7c81ae2894bdad8b614297b281b67fd2fc (diff) | |
| download | rust-90d28ec372185f94529fd6c72cc17c9cf1e9f137.tar.gz rust-90d28ec372185f94529fd6c72cc17c9cf1e9f137.zip | |
rustbuild: Enable bootstrapping new hosts
This commit fixes a longstanding issue with the makefiles where all host platforms bootstrap themselves. This commit alters the build logic for the bootstrap to instead only bootstrap the build triple, and all other compilers are compiled from that one compiler. The benefit of this change is that we can cross-compile compilers which cannot run on the build platform. For example our builders could start creating `arm-unknown-linux-gnueabihf` compilers. This reduces the amount of bootstrapping we do, reducing the amount of test coverage, but overall it should largely just end in faster build times for multi-host compiles as well as enabling a feature which can't be done today. cc #5258
| -rw-r--r-- | src/bootstrap/build/step.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/bootstrap/build/step.rs b/src/bootstrap/build/step.rs index 2fbf1a6ad1d..6c0c55fddee 100644 --- a/src/bootstrap/build/step.rs +++ b/src/bootstrap/build/step.rs @@ -151,15 +151,12 @@ impl<'a> Step<'a> { pub fn deps(&self, build: &'a Build) -> Vec<Step<'a>> { match self.src { Source::Rustc { stage: 0 } => { - if self.target == build.config.build { - Vec::new() - } else { - let compiler = Compiler::new(0, &build.config.build); - vec![self.librustc(0, compiler)] - } + assert!(self.target == build.config.build); + Vec::new() } Source::Rustc { stage } => { - vec![self.librustc(stage - 1, self.compiler(stage - 1))] + let compiler = Compiler::new(stage - 1, &build.config.build); + vec![self.librustc(stage - 1, compiler)] } Source::Librustc { stage, compiler } => { vec![self.libstd(stage, compiler), self.llvm(())] |
