diff options
| author | bors <bors@rust-lang.org> | 2024-12-11 05:31:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-12-11 05:31:46 +0000 |
| commit | 5a6036a1802262f8cf02192b02026688d396f1d7 (patch) | |
| tree | 650b0a9e24636969280985d15b303d2b7ce931df /compiler/rustc_codegen_llvm/src | |
| parent | 33c245b9e98bc91e18ea1c5033824f4c6f92766f (diff) | |
| parent | e60f6cdd3d13bf555ec3f962a153480afa664cb4 (diff) | |
| download | rust-5a6036a1802262f8cf02192b02026688d396f1d7.tar.gz rust-5a6036a1802262f8cf02192b02026688d396f1d7.zip | |
Auto merge of #134137 - fmease:rollup-u1p7swx, r=fmease
Rollup of 9 pull requests Successful merges: - #133583 (Fix type (exit → exist)) - #134042 (Add the `power8-crypto` target feature) - #134094 (Tweak wording of non-const traits used as const bounds) - #134100 (Remove rustc_const_stable attribute on const NOOP) - #134103 (Don't ICE when encountering never in range pattern) - #134113 (run-make: Fix `assert_stderr_not_contains_regex`) - #134115 (rustc_target: ppc64 target string fixes for LLVM 20) - #134116 (stabilize const_nonnull_new) - #134120 (Remove Felix from ping groups and review rotation) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 3 |
2 files changed, 8 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. diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index db2b03d9aed..07eb89e6041 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -230,6 +230,8 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea "aarch64" } else if sess.target.arch == "sparc64" { "sparc" + } else if sess.target.arch == "powerpc64" { + "powerpc" } else { &*sess.target.arch }; @@ -289,6 +291,7 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea // https://github.com/llvm/llvm-project/blob/llvmorg-18.1.0/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp#L26 ("sparc", "v8plus") if get_version().0 == 19 => Some(LLVMFeature::new("v9")), ("sparc", "v8plus") if get_version().0 < 19 => None, + ("powerpc", "power8-crypto") => Some(LLVMFeature::new("crypto")), (_, s) => Some(LLVMFeature::new(s)), } } |
