Various fixes for Rust on MIPS
authorDragan Mladjenovic <dmladjenovic@wavecomp.com>
Sun, 19 Sep 2021 18:48:33 +0000 (19:48 +0100)
committerXimin Luo <infinity0@debian.org>
Sun, 19 Sep 2021 18:48:33 +0000 (19:48 +0100)
Bug-Debian: https://bugs.debian.org/881845
Last-Update: 2020-03-23

Gbp-Pq: Name u-mips-fixes.diff

compiler/rustc_codegen_llvm/src/llvm_util.rs

index 544ef38c12c6d8d4286de41c82207fbf7f52c2c5..b55e7070b1d9792c365275487e1111f90275e221 100644 (file)
@@ -98,6 +98,12 @@ unsafe fn configure_llvm(sess: &Session) {
         // during inlining. Unfortunately these may block other optimizations.
         add("-preserve-alignment-assumptions-during-inlining=false", false);
 
+        if sess.target.arch == "mips"
+            || sess.target.arch == "mips64"
+        {
+            add("-fast-isel=0", false);
+        }
+
         for arg in sess_args {
             add(&(*arg), true);
         }