Drop support for -Znew-llvm-pass-manager=no with LLVM 15
This commit is contained in:
parent
57717eb8ad
commit
25286dda2b
2 changed files with 11 additions and 0 deletions
|
@ -523,6 +523,12 @@ pub(crate) unsafe fn optimize(
|
||||||
let module_name = module.name.clone();
|
let module_name = module.name.clone();
|
||||||
let module_name = Some(&module_name[..]);
|
let module_name = Some(&module_name[..]);
|
||||||
|
|
||||||
|
if let Some(false) = config.new_llvm_pass_manager && llvm_util::get_version() >= (15, 0, 0) {
|
||||||
|
diag_handler.warn(
|
||||||
|
"ignoring `-Z new-llvm-pass-manager=no`, which is no longer supported with LLVM 15",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if config.emit_no_opt_bc {
|
if config.emit_no_opt_bc {
|
||||||
let out = cgcx.output_filenames.temp_path_ext("no-opt.bc", module_name);
|
let out = cgcx.output_filenames.temp_path_ext("no-opt.bc", module_name);
|
||||||
let out = path_to_c_string(&out);
|
let out = path_to_c_string(&out);
|
||||||
|
|
|
@ -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.
|
// The new pass manager is enabled by default for LLVM >= 13.
|
||||||
// This matches Clang, which also enables it since Clang 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
|
// 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.
|
// s390x with LLVM 13, so enable the new pass manager only with LLVM 14.
|
||||||
// See https://github.com/rust-lang/rust/issues/89609.
|
// See https://github.com/rust-lang/rust/issues/89609.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue