Rollup merge of #122649 - cuviper:min-llvm-17, r=nikic

Update the minimum external LLVM to 17

With this change, we'll have stable support for LLVM 17 and 18.
For reference, the previous increase to LLVM 16 was #117947.
This commit is contained in:
Matthias Krüger 2024-03-18 16:27:09 +01:00 committed by GitHub
commit 1ac0239bd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 20 additions and 170 deletions

View file

@ -126,17 +126,6 @@ pub unsafe fn create_module<'ll>(
let mut target_data_layout = sess.target.data_layout.to_string();
let llvm_version = llvm_util::get_version();
if llvm_version < (17, 0, 0) {
if sess.target.arch.starts_with("powerpc") {
// LLVM 17 specifies function pointer alignment for ppc:
// https://reviews.llvm.org/D147016
target_data_layout = target_data_layout
.replace("-Fn32", "")
.replace("-Fi32", "")
.replace("-Fn64", "")
.replace("-Fi64", "");
}
}
if llvm_version < (18, 0, 0) {
if sess.target.arch == "x86" || sess.target.arch == "x86_64" {
// LLVM 18 adjusts i128 to be 128-bit aligned on x86 variants.