Fix -Cpasses=list and llvm version print with -vV

This commit is contained in:
bjorn3 2021-01-13 12:15:42 +01:00 committed by GitHub
parent a6403b0f04
commit 64c1b0d614
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -808,7 +808,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
println!("commit-date: {}", unw(util::commit_date_str()));
println!("host: {}", config::host_triple());
println!("release: {}", unw(util::release_str()));
if cfg!(llvm) {
if cfg!(feature = "llvm") {
get_builtin_codegen_backend("llvm")().print_version();
}
}
@ -1096,7 +1096,7 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
}
if cg_flags.iter().any(|x| *x == "passes=list") {
if cfg!(llvm) {
if cfg!(feature = "llvm") {
get_builtin_codegen_backend("llvm")().print_passes();
}
return None;