about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-10-31 06:56:36 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-10-31 07:01:02 -0700
commitb1fd5a761844ec0a90a91e81add60689d0e80eef (patch)
tree8293c2790901e7f5e4852aa4b3229c8dae8559db /src
parent6713736275181abb3304730603afd785b0470ae3 (diff)
downloadrust-b1fd5a761844ec0a90a91e81add60689d0e80eef.tar.gz
rust-b1fd5a761844ec0a90a91e81add60689d0e80eef.zip
rustbuild: Don't build with ThinLTO on MIPS
Discovered in #45529 it looks like cross-module TLS imports aren't quite working
today, especially with `hidden` visibility which mostly comes up with multiple
codegen units. As a result this completely disables compiling with ThinLTO and
multiple codegen units on MIPS when bootstrapping.

cc #45654, the tracking issue for this
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/builder.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 0dca395fa1f..bb3d9dc3f33 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -617,14 +617,16 @@ impl<'a> Builder<'a> {
         if self.is_very_verbose() {
             cargo.arg("-v");
         }
-        // FIXME: cargo bench does not accept `--release`
-        if self.config.rust_optimize && cmd != "bench" {
-            cargo.arg("--release");
+        if self.config.rust_optimize {
+            // FIXME: cargo bench does not accept `--release`
+            if cmd != "bench" {
+                cargo.arg("--release");
+            }
 
-            if mode != Mode::Libstd &&
+            if mode != Mode::Libstd && // FIXME(#45320)
                self.config.rust_codegen_units.is_none() &&
-               self.build.is_rust_llvm(compiler.host)
-
+               self.build.is_rust_llvm(compiler.host) &&
+               !target.contains("mips") // FIXME(#45654)
             {
                 cargo.env("RUSTC_THINLTO", "1");
             }