Skip to content

Commit 557d05b

Browse files
Do not build LLVM tools for any of the tools
None of the tools in the list should need LLVM tools themselves as far as I can tell; if this is incorrect, we can re-enable the tool building later. The primary reason for doing this is that rust-central-station uses the BuildManifest tool and building LLVM there is not cached: it takes ~1.5 hours on the 2 core machine. This commit should make nightlies and stable releases much faster.
1 parent 8acec1f commit 557d05b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/bootstrap/tool.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ macro_rules! tool {
273273
/// Whether this tool requires LLVM to run
274274
pub fn uses_llvm_tools(&self) -> bool {
275275
match self {
276-
$(Tool::$name => true $(&& $llvm)*,)+
276+
$(Tool::$name => false $(|| $llvm)*,)+
277277
}
278278
}
279279
}
@@ -340,20 +340,17 @@ macro_rules! tool {
340340
}
341341
}
342342

343-
// FIXME(#51459): We have only checked that RustInstaller does not require
344-
// the LLVM binaries when running. We should go through all tools to determine
345-
// if they really need LLVM binaries, and make `llvm_tools` a required argument.
346343
tool!(
347344
Rustbook, "src/tools/rustbook", "rustbook", Mode::ToolRustc;
348345
ErrorIndex, "src/tools/error_index_generator", "error_index_generator", Mode::ToolRustc;
349346
UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen", Mode::ToolStd;
350347
Tidy, "src/tools/tidy", "tidy", Mode::ToolStd;
351348
Linkchecker, "src/tools/linkchecker", "linkchecker", Mode::ToolStd;
352349
CargoTest, "src/tools/cargotest", "cargotest", Mode::ToolStd;
353-
Compiletest, "src/tools/compiletest", "compiletest", Mode::ToolTest;
350+
Compiletest, "src/tools/compiletest", "compiletest", Mode::ToolTest, llvm_tools = true;
354351
BuildManifest, "src/tools/build-manifest", "build-manifest", Mode::ToolStd;
355352
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client", Mode::ToolStd;
356-
RustInstaller, "src/tools/rust-installer", "fabricate", Mode::ToolStd, llvm_tools = false;
353+
RustInstaller, "src/tools/rust-installer", "fabricate", Mode::ToolStd;
357354
RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes", Mode::ToolStd;
358355
);
359356

0 commit comments

Comments
 (0)