Rollup merge of #134115 - durin42:ppc64-target-string, r=jieyouxu

rustc_target: ppc64 target string fixes for LLVM 20

LLVM continues to clean these up, and we continue to make this consistent. This is similar to 9caced7bad, e985396145, and
a10e744faf.

```@rustbot``` label: +llvm-main
This commit is contained in:
León Orell Valerian Liehr 2024-12-10 20:16:05 +01:00 committed by GitHub
commit 6d17cb833d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 14 additions and 9 deletions

View file

@ -159,6 +159,11 @@ pub(crate) unsafe fn create_module<'ll>(
// See https://github.com/llvm/llvm-project/pull/112084
target_data_layout = target_data_layout.replace("-i128:128", "");
}
if sess.target.arch.starts_with("powerpc64") {
// LLVM 20 updates the powerpc64 layout to correctly align 128 bit integers to 128 bit.
// See https://github.com/llvm/llvm-project/pull/118004
target_data_layout = target_data_layout.replace("-i128:128", "");
}
}
// Ensure the data-layout values hardcoded remain the defaults.