Adjust LoongArch64 data layouts for LLVM update
The data layout was changed in LLVM 19: llvm/llvm-project#93814
This commit is contained in:
parent
bdb1b7f5d9
commit
4a06a5bc7a
5 changed files with 12 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue