diff options
| author | The rustc-josh-sync Cronjob Bot <github-actions@github.com> | 2025-07-21 04:17:50 +0000 |
|---|---|---|
| committer | The rustc-josh-sync Cronjob Bot <github-actions@github.com> | 2025-07-21 04:17:50 +0000 |
| commit | ad20b064c30bbe9626e8c99f2b455cc6fd836d18 (patch) | |
| tree | 1c8ac5ec462a793060ccc53aa22c33a0b9215640 /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | 897d007f8f2d4018fba5f2884cb1b45846d8a371 (diff) | |
| parent | 460259d14de0274b97b8801e08cb2fe5f16fdac5 (diff) | |
| download | rust-ad20b064c30bbe9626e8c99f2b455cc6fd836d18.tar.gz rust-ad20b064c30bbe9626e8c99f2b455cc6fd836d18.zip | |
Merge ref '460259d14de0' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 460259d14de0274b97b8801e08cb2fe5f16fdac5 Filtered ref: 599ee17eb87c83f97eb37fd9fe264da65d4c9461 This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 5 |
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 6a23becaa96..34bed2a1d2a 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -207,6 +207,11 @@ pub(crate) unsafe fn create_module<'ll>( // LLVM 21 updated the default layout on nvptx: https://github.com/llvm/llvm-project/pull/124961 target_data_layout = target_data_layout.replace("e-p6:32:32-i64", "e-i64"); } + if sess.target.arch == "amdgpu" { + // LLVM 21 adds the address width for address space 8. + // See https://github.com/llvm/llvm-project/pull/139419 + target_data_layout = target_data_layout.replace("p8:128:128:128:48", "p8:128:128") + } } // Ensure the data-layout values hardcoded remain the defaults. |
