X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fbootstrap%2Ftool.rs;h=7f24768a4f10e54cce459ab65dc2af4f46134f0f;hb=3850d96379126087240b640470632362a5d32234;hp=9fd20386e367bd815c7cb872f1ca9aec4272913b;hpb=a5bc786399405c03a746ad385e579542788c8522;p=rust.git diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 9fd20386e36..7f24768a4f1 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -289,8 +289,8 @@ fn rustbook_features() -> Vec { macro_rules! bootstrap_tool { ($( $name:ident, $path:expr, $tool_name:expr - $(,llvm_tools = $llvm:expr)* $(,is_external_tool = $external:expr)* + $(,is_unstable_tool = $unstable:expr)* $(,features = $features:expr)* ; )+) => { @@ -301,15 +301,6 @@ pub enum 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 { @@ -350,7 +341,12 @@ fn run(self, builder: &Builder<'_>) -> PathBuf { 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)* { @@ -377,7 +373,7 @@ fn run(self, builder: &Builder<'_>) -> PathBuf { 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", 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;