Skip to content

Commit

Permalink
link to llvm changes that prompted the special cases
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed Feb 18, 2023
1 parent fabfd1f commit 225e01e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_codegen_llvm/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ pub unsafe fn create_module<'ll>(
let llvm_version = llvm_util::get_version();
if llvm_version < (16, 0, 0) {
if sess.target.arch == "s390x" {
// See https://reviews.llvm.org/D131158
target_data_layout = target_data_layout.replace("-v128:64", "");
} else if sess.target.arch == "riscv64" {
// See https://reviews.llvm.org/D116735
target_data_layout = target_data_layout.replace("-n32:64-", "-n64-");
}
}
Expand Down

0 comments on commit 225e01e

Please sign in to comment.