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/tool.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/tool.rs')
| -rw-r--r-- | src/bootstrap/tool.rs | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 23b3f5a0826..e98e3745fda 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -104,9 +104,10 @@ impl Step for ToolBuild { let is_ext_tool = self.is_ext_tool; match self.mode { - Mode::ToolStd => builder.ensure(compile::Std { compiler, target }), - Mode::ToolTest => builder.ensure(compile::Test { compiler, target }), - Mode::ToolRustc => builder.ensure(compile::Rustc { compiler, target }), + Mode::ToolRustc => { + builder.ensure(compile::Rustc { compiler, target }) + } + Mode::ToolBootstrap => {} // uses downloaded stage0 compiler libs _ => panic!("unexpected Mode for tool build") } @@ -341,17 +342,17 @@ macro_rules! tool { } tool!( - Rustbook, "src/tools/rustbook", "rustbook", Mode::ToolRustc; + Rustbook, "src/tools/rustbook", "rustbook", Mode::ToolBootstrap; ErrorIndex, "src/tools/error_index_generator", "error_index_generator", Mode::ToolRustc; - UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen", Mode::ToolStd; - Tidy, "src/tools/tidy", "tidy", Mode::ToolStd; - Linkchecker, "src/tools/linkchecker", "linkchecker", Mode::ToolStd; - CargoTest, "src/tools/cargotest", "cargotest", Mode::ToolStd; - Compiletest, "src/tools/compiletest", "compiletest", Mode::ToolTest, llvm_tools = true; - BuildManifest, "src/tools/build-manifest", "build-manifest", Mode::ToolStd; - RemoteTestClient, "src/tools/remote-test-client", "remote-test-client", Mode::ToolStd; - RustInstaller, "src/tools/rust-installer", "fabricate", Mode::ToolStd; - RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes", Mode::ToolStd; + UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen", Mode::ToolBootstrap; + Tidy, "src/tools/tidy", "tidy", Mode::ToolBootstrap; + Linkchecker, "src/tools/linkchecker", "linkchecker", Mode::ToolBootstrap; + CargoTest, "src/tools/cargotest", "cargotest", Mode::ToolBootstrap; + Compiletest, "src/tools/compiletest", "compiletest", Mode::ToolBootstrap, llvm_tools = true; + BuildManifest, "src/tools/build-manifest", "build-manifest", Mode::ToolBootstrap; + RemoteTestClient, "src/tools/remote-test-client", "remote-test-client", Mode::ToolBootstrap; + RustInstaller, "src/tools/rust-installer", "fabricate", Mode::ToolBootstrap; + RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes", Mode::ToolBootstrap; ); #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -379,7 +380,7 @@ impl Step for RemoteTestServer { compiler: self.compiler, target: self.target, tool: "remote-test-server", - mode: Mode::ToolStd, + mode: Mode::ToolBootstrap, path: "src/tools/remote-test-server", is_ext_tool: false, extra_features: Vec::new(), @@ -604,7 +605,11 @@ impl<'a> Builder<'a> { fn prepare_tool_cmd(&self, compiler: Compiler, tool: Tool, cmd: &mut Command) { let host = &compiler.host; let mut lib_paths: Vec<PathBuf> = vec![ - PathBuf::from(&self.sysroot_libdir(compiler, compiler.host)), + if compiler.stage == 0 { + self.build.rustc_snapshot_libdir() + } else { + PathBuf::from(&self.sysroot_libdir(compiler, compiler.host)) + }, self.cargo_out(compiler, tool.get_mode(), *host).join("deps"), ]; |
