diff options
| author | bors <bors@rust-lang.org> | 2024-06-12 20:48:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-06-12 20:48:06 +0000 |
| commit | 8337ba9189de188e2ed417018af2bf17a57d51ac (patch) | |
| tree | 18ed3862948caf947ac0a4c30643f75747e177f8 /compiler/rustc_codegen_llvm/src | |
| parent | c25ac9d6cc285e57e1176dc2da6848b9d0163810 (diff) | |
| parent | 0d1d6ba58c2f962c7c603202940fb6653bda136f (diff) | |
| download | rust-8337ba9189de188e2ed417018af2bf17a57d51ac.tar.gz rust-8337ba9189de188e2ed417018af2bf17a57d51ac.zip | |
Auto merge of #126345 - compiler-errors:rollup-lue8u92, r=compiler-errors
Rollup of 8 pull requests Successful merges: - #125869 (Add `target_env = "p1"` to the `wasm32-wasip1` target) - #126019 (Add TODO comment to unsafe env modification) - #126036 (Migrate `run-make/short-ice` to `rmake`) - #126276 (Detect pub structs never constructed even though they impl pub trait with assoc constants) - #126282 (Ensure self-contained linker is only enabled on dev/nightly ) - #126317 (Avoid a bunch of booleans in favor of Result<(), ErrorGuaranteed> as that more robustly proves that an error has been emitted) - #126324 (Adjust LoongArch64 data layouts for LLVM update) - #126340 (Fix outdated predacates_of.rs comments) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 8 |
1 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 53a098d178e..7d92888feee 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -142,6 +142,14 @@ pub unsafe fn create_module<'ll>( } } + if llvm_version < (19, 0, 0) { + if sess.target.arch == "loongarch64" { + // LLVM 19 updates the LoongArch64 data layout. + // See https://github.com/llvm/llvm-project/pull/93814 + target_data_layout = target_data_layout.replace("-n32:64", "-n64"); + } + } + // Ensure the data-layout values hardcoded remain the defaults. { let tm = crate::back::write::create_informational_target_machine(tcx.sess); |
