about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-12-10 20:16:05 +0100
committerGitHub <noreply@github.com>2024-12-10 20:16:05 +0100
commit6d17cb833d9e2118afd3ac29d01ea00227d7ea39 (patch)
tree983e5262076a3a1f0b982c5562770c55f2cd3a42 /compiler/rustc_codegen_llvm/src
parent0b9e74af2ef286c22aa2e6105cedd37987ddf527 (diff)
parent0680155a171d47772302fc4da4cbbfa466378d81 (diff)
downloadrust-6d17cb833d9e2118afd3ac29d01ea00227d7ea39.tar.gz
rust-6d17cb833d9e2118afd3ac29d01ea00227d7ea39.zip
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 9caced7badc337ced7ad89eb614621c39bd996e9, e9853961452b56997cc127b51308879b9cd09482, and
a10e744fafa7eb3afef9a938097509bf4b225f84.

```@rustbot``` label: +llvm-main
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 8218126ea29..e0506c0c5fd 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -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.