about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-09-25 18:05:22 +0000
committerbors <bors@rust-lang.org>2017-09-25 18:05:22 +0000
commit3df1f7b82d9bede5122ee745cdd4e731abbce892 (patch)
tree8940e26551549d564690fef64cf207390252f45b /src/bootstrap
parent91dbf52af3de0436bcc032229540db1fe14b6df8 (diff)
parent843cd5bacc56dc7a9ec45d3aaebf717566f5bf36 (diff)
downloadrust-3df1f7b82d9bede5122ee745cdd4e731abbce892.tar.gz
rust-3df1f7b82d9bede5122ee745cdd4e731abbce892.zip
Auto merge of #44085 - bjorn3:no_llvm_write_metadata, r=arielb1
Allow writing metadata without llvm

# Todo:

* [x] Rebase
* [x] Fix eventual errors
* [x] <strike>Find some crate to write elf files</strike> (will do it later)

Cc #43842
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/builder.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 8a6c998c932..ffd959d86f5 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -531,7 +531,10 @@ impl<'a> Builder<'a> {
         // For other crates, however, we know that we've already got a standard
         // library up and running, so we can use the normal compiler to compile
         // build scripts in that situation.
-        if mode == Mode::Libstd {
+        //
+        // If LLVM support is disabled we need to use the snapshot compiler to compile
+        // build scripts, as the new compiler doesnt support executables.
+        if mode == Mode::Libstd || !self.build.config.llvm_enabled {
             cargo.env("RUSTC_SNAPSHOT", &self.initial_rustc)
                  .env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_snapshot_libdir());
         } else {