summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2024-11-07 20:59:50 +0100
committerHans Wennborg <hans@chromium.org>2024-11-07 20:59:50 +0100
commiteb7d95bafdf2b2de46d2524c0515a06144e4953d (patch)
treec713d02a1cfb243f72e791b761c7e30f53ce80e3 /compiler/rustc_codegen_llvm/src
parent392ac35ed15f24aec038e653be561c8476a68fbb (diff)
downloadrust-eb7d95bafdf2b2de46d2524c0515a06144e4953d.tar.gz
rust-eb7d95bafdf2b2de46d2524c0515a06144e4953d.zip
remove the extra specification for llvm versions < 20
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/context.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index b7ab5d6d5f0..ba863d9d74b 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -154,6 +154,11 @@ pub(crate) unsafe fn create_module<'ll>(
             // See https://github.com/llvm/llvm-project/pull/106951
             target_data_layout = target_data_layout.replace("-i128:128", "");
         }
+        if sess.target.arch.starts_with("mips64") {
+            // LLVM 20 updates the mips64 layout to correctly align 128 bit integers to 128 bit.
+            // See https://github.com/llvm/llvm-project/pull/112084
+            target_data_layout = target_data_layout.replace("-i128:128", "");
+        }
     }
 
     // Ensure the data-layout values hardcoded remain the defaults.