Various fixes for Rust on MIPS
authorDragan Mladjenovic <dmladjenovic@wavecomp.com>
Sat, 18 Sep 2021 10:45:21 +0000 (11:45 +0100)
committerXimin Luo <infinity0@debian.org>
Sat, 18 Sep 2021 10:45:21 +0000 (11:45 +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 a3139ce5a345543984b8f89520139fbf6d4a75ff..493de83a5694190f32b4d0b3d74f0814c3f23ef9 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);
         }