diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-06-29 14:35:10 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-07-03 18:06:29 -0700 |
| commit | ef41cf028809328d3f976d3c2eb6a7ef8d912a19 (patch) | |
| tree | 6565dd03934020c49b66f70e049e16449141490a /src/bootstrap/lib.rs | |
| parent | fb97bb50d1da7b7cafdaf83797f3514279f80421 (diff) | |
| download | rust-ef41cf028809328d3f976d3c2eb6a7ef8d912a19.tar.gz rust-ef41cf028809328d3f976d3c2eb6a7ef8d912a19.zip | |
Compile stage0 tools with the raw bootstrap compiler
This commit updates the stage0 build of tools to use the libraries of the stage0 compiler instead of the compiled libraries by the stage0 compiler. This should enable us to avoid any stage0 hacks (like missing SIMD).
Diffstat (limited to 'src/bootstrap/lib.rs')
| -rw-r--r-- | src/bootstrap/lib.rs | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 414f17dfad4..ed2482aeea0 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -328,16 +328,22 @@ pub enum Mode { /// Build codegen libraries, placing output in the "stageN-codegen" directory Codegen, - /// Build some tools, placing output in the "stageN-tools" directory. - ToolStd, - ToolTest, + /// Build some tools, placing output in the "stageN-tools" directory. The + /// "other" here is for miscellaneous sets of tools that are built using the + /// bootstrap compiler in its entirety (target libraries and all). + /// Typically these tools compile with stable Rust. + ToolBootstrap, + + /// Compile a tool which uses all libraries we compile (up to rustc). + /// Doesn't use the stage0 compiler libraries like "other", and includes + /// tools like rustdoc, cargo, rls, etc. ToolRustc, } impl Mode { pub fn is_tool(&self) -> bool { match self { - Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => true, + Mode::ToolBootstrap | Mode::ToolRustc => true, _ => false } } @@ -547,7 +553,8 @@ impl Build { Mode::Test => "-test", Mode::Codegen => "-rustc", Mode::Rustc => "-rustc", - Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => "-tools", + Mode::ToolBootstrap => "-bootstrap-tools", + Mode::ToolRustc => "-tools", }; self.out.join(&*compiler.host) .join(format!("stage{}{}", compiler.stage, suffix)) @@ -656,8 +663,12 @@ impl Build { /// Returns the libdir of the snapshot compiler. fn rustc_snapshot_libdir(&self) -> PathBuf { + self.rustc_snapshot_sysroot().join(libdir(&self.config.build)) + } + + /// Returns the sysroot of the snapshot compiler. + fn rustc_snapshot_sysroot(&self) -> &Path { self.initial_rustc.parent().unwrap().parent().unwrap() - .join(libdir(&self.config.build)) } /// Runs a command, printing out nice contextual information if it fails. |
