about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-11-07 18:48:26 -0800
committerGitHub <noreply@github.com>2024-11-07 18:48:26 -0800
commit97dbab9124ff8ecaf4ced5720996e67e51fc62ea (patch)
tree7d47ec1837ad0a4b501ede5ad0a0799cc48a4e6e /compiler/rustc_codegen_llvm
parente2d429e22faaa6a3e4da77b1bf3fb2ba8c57690e (diff)
parenteb7d95bafdf2b2de46d2524c0515a06144e4953d (diff)
downloadrust-97dbab9124ff8ecaf4ced5720996e67e51fc62ea.tar.gz
rust-97dbab9124ff8ecaf4ced5720996e67e51fc62ea.zip
Rollup merge of #132741 - zmodem:mips_data_layout, r=nikic
Update mips64 data layout to match LLVM 20 change

LLVM changed the data layout in https://github.com/llvm/llvm-project/pull/112084
Diffstat (limited to 'compiler/rustc_codegen_llvm')
-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.