Skip to content

Commit eb7d95b

Browse files
committed
remove the extra specification for llvm versions < 20
1 parent 392ac35 commit eb7d95b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_codegen_llvm/src/context.rs

+5
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ pub(crate) unsafe fn create_module<'ll>(
154154
// See https://github.com/llvm/llvm-project/pull/106951
155155
target_data_layout = target_data_layout.replace("-i128:128", "");
156156
}
157+
if sess.target.arch.starts_with("mips64") {
158+
// LLVM 20 updates the mips64 layout to correctly align 128 bit integers to 128 bit.
159+
// See https://github.com/llvm/llvm-project/pull/112084
160+
target_data_layout = target_data_layout.replace("-i128:128", "");
161+
}
157162
}
158163

159164
// Ensure the data-layout values hardcoded remain the defaults.

0 commit comments

Comments
 (0)