Drop support for -Znew-llvm-pass-manager=no with LLVM 15

This commit is contained in:
Nikita Popov
2022-04-19 15:02:43 +02:00
parent 57717eb8ad
commit 25286dda2b
2 changed files with 11 additions and 0 deletions

View File

@@ -542,6 +542,11 @@ pub(crate) fn should_use_new_llvm_pass_manager(user_opt: &Option<bool>, target_a
// The new pass manager is enabled by default for LLVM >= 13.
// This matches Clang, which also enables it since Clang 13.
// Since LLVM 15, the legacy pass manager is no longer supported.
if llvm_util::get_version() >= (15, 0, 0) {
return true;
}
// There are some perf issues with the new pass manager when targeting
// s390x with LLVM 13, so enable the new pass manager only with LLVM 14.
// See https://github.com/rust-lang/rust/issues/89609.