From ad1f19479c05ed4eeaaba8f207a61e3d48b0a0b7 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 29 Jul 2017 13:39:43 -0700 Subject: [PATCH] rustbuild: Enable building LLVM I use this from time to time debugging LLVM builds, useful to have! --- src/bootstrap/builder.rs | 4 +++- src/bootstrap/native.rs | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 2f6e3ca9253..811c7df5d99 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -28,6 +28,7 @@ use flags::Subcommand; use doc; use tool; +use native; pub use Compiler; @@ -256,7 +257,8 @@ macro_rules! describe { compile::StartupObjects, tool::BuildManifest, tool::Rustbook, tool::ErrorIndex, tool::UnstableBookGen, tool::Tidy, tool::Linkchecker, tool::CargoTest, tool::Compiletest, tool::RemoteTestServer, tool::RemoteTestClient, - tool::RustInstaller, tool::Cargo, tool::Rls, tool::Rustdoc), + tool::RustInstaller, tool::Cargo, tool::Rls, tool::Rustdoc, + native::Llvm), Kind::Test => describe!(check::Tidy, check::Bootstrap, check::DefaultCompiletest, check::HostCompiletest, check::Crate, check::CrateLibrustc, check::Linkcheck, check::Cargotest, check::Cargo, check::Rls, check::Docs, check::ErrorIndex, diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index bb80674c887..1da277cf181 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -48,6 +48,10 @@ fn should_run(run: ShouldRun) -> ShouldRun { run.path("src/llvm") } + fn make_run(run: RunConfig) { + run.builder.ensure(Llvm { target: run.target }) + } + /// Compile LLVM for `target`. fn run(self, builder: &Builder) { let build = builder.build;