Skip to content

Commit ad1f194

Browse files
committed
rustbuild: Enable building LLVM
I use this from time to time debugging LLVM builds, useful to have!
1 parent ad36f8f commit ad1f194

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/bootstrap/builder.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use check;
2828
use flags::Subcommand;
2929
use doc;
3030
use tool;
31+
use native;
3132

3233
pub use Compiler;
3334

@@ -256,7 +257,8 @@ impl<'a> Builder<'a> {
256257
compile::StartupObjects, tool::BuildManifest, tool::Rustbook, tool::ErrorIndex,
257258
tool::UnstableBookGen, tool::Tidy, tool::Linkchecker, tool::CargoTest,
258259
tool::Compiletest, tool::RemoteTestServer, tool::RemoteTestClient,
259-
tool::RustInstaller, tool::Cargo, tool::Rls, tool::Rustdoc),
260+
tool::RustInstaller, tool::Cargo, tool::Rls, tool::Rustdoc,
261+
native::Llvm),
260262
Kind::Test => describe!(check::Tidy, check::Bootstrap, check::DefaultCompiletest,
261263
check::HostCompiletest, check::Crate, check::CrateLibrustc, check::Linkcheck,
262264
check::Cargotest, check::Cargo, check::Rls, check::Docs, check::ErrorIndex,

src/bootstrap/native.rs

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ impl Step for Llvm {
4848
run.path("src/llvm")
4949
}
5050

51+
fn make_run(run: RunConfig) {
52+
run.builder.ensure(Llvm { target: run.target })
53+
}
54+
5155
/// Compile LLVM for `target`.
5256
fn run(self, builder: &Builder) {
5357
let build = builder.build;

0 commit comments

Comments
 (0)