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
This commit is contained in:
Jubilee 2024-11-07 18:48:26 -08:00 committed by GitHub
commit 97dbab9124
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 12 additions and 7 deletions

View file

@ -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.