From 7c52718ba22179451bca76d246037a5f7480eae1 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 8 Jan 2020 09:44:45 -0800 Subject: [PATCH 1/3] Remove obsolete llvm_tools flag --- src/bootstrap/tool.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 9fd20386e367b..89245825ed5b9 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -289,7 +289,6 @@ fn rustbook_features() -> Vec { macro_rules! bootstrap_tool { ($( $name:ident, $path:expr, $tool_name:expr - $(,llvm_tools = $llvm:expr)* $(,is_external_tool = $external:expr)* $(,features = $features:expr)* ; @@ -301,15 +300,6 @@ macro_rules! bootstrap_tool { )+ } - impl Tool { - /// Whether this tool requires LLVM to run - pub fn uses_llvm_tools(&self) -> bool { - match self { - $(Tool::$name => false $(|| $llvm)*,)+ - } - } - } - impl<'a> Builder<'a> { pub fn tool_exe(&self, tool: Tool) -> PathBuf { match tool { @@ -377,7 +367,7 @@ bootstrap_tool!( Tidy, "src/tools/tidy", "tidy"; Linkchecker, "src/tools/linkchecker", "linkchecker"; CargoTest, "src/tools/cargotest", "cargotest"; - Compiletest, "src/tools/compiletest", "compiletest", llvm_tools = true; + Compiletest, "src/tools/compiletest", "compiletest"; BuildManifest, "src/tools/build-manifest", "build-manifest"; RemoteTestClient, "src/tools/remote-test-client", "remote-test-client"; RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true; From 51b7044347d2cb9e2eae18ad49c79803dda60be2 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 8 Jan 2020 10:04:18 -0800 Subject: [PATCH 2/3] Build compiletest with in-tree libtest --- src/bootstrap/tool.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 89245825ed5b9..7f24768a4f10e 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -290,6 +290,7 @@ macro_rules! bootstrap_tool { ($( $name:ident, $path:expr, $tool_name:expr $(,is_external_tool = $external:expr)* + $(,is_unstable_tool = $unstable:expr)* $(,features = $features:expr)* ; )+) => { @@ -340,7 +341,12 @@ macro_rules! bootstrap_tool { compiler: self.compiler, target: self.target, tool: $tool_name, - mode: Mode::ToolBootstrap, + mode: if false $(|| $unstable)* { + // use in-tree libraries for unstable features + Mode::ToolStd + } else { + Mode::ToolBootstrap + }, path: $path, is_optional_tool: false, source_type: if false $(|| $external)* { @@ -367,7 +373,7 @@ bootstrap_tool!( Tidy, "src/tools/tidy", "tidy"; Linkchecker, "src/tools/linkchecker", "linkchecker"; CargoTest, "src/tools/cargotest", "cargotest"; - Compiletest, "src/tools/compiletest", "compiletest"; + Compiletest, "src/tools/compiletest", "compiletest", is_unstable_tool = true; BuildManifest, "src/tools/build-manifest", "build-manifest"; RemoteTestClient, "src/tools/remote-test-client", "remote-test-client"; RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true; From 686d5f83efcd552465ce4ab236f2ffb66c055d90 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 8 Jan 2020 15:13:50 -0800 Subject: [PATCH 3/3] Comment on allowing only feature(test) in compiletest --- src/tools/compiletest/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index da1e3760e010d..0642823404aed 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -1,6 +1,8 @@ #![crate_name = "compiletest"] -#![feature(test)] #![deny(warnings)] +// The `test` crate is the only unstable feature +// allowed here, just to share similar code. +#![feature(test)] extern crate test;