]> git.lizzy.rs Git - rust.git/commitdiff
rustbuild: Don't build with ThinLTO on MIPS
authorAlex Crichton <alex@alexcrichton.com>
Tue, 31 Oct 2017 13:56:36 +0000 (06:56 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 31 Oct 2017 14:01:02 +0000 (07:01 -0700)
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

src/bootstrap/builder.rs

index 0dca395fa1fdbfe8f48d8ff709a247e8813351fb..bb3d9dc3f33b1e1d96ea858ff25c2c9f3523d727 100644 (file)
@@ -617,14 +617,16 @@ pub fn cargo(&self,
         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");
             }