Skip to content

Commit

Permalink
Rollup merge of rust-lang#87553 - bjorn3:fix_hotplug_codegen_version,…
Browse files Browse the repository at this point in the history
… r=wesleywiser

Fix typo in rustc_driver::version

This caused rustc `-Zcodegen-backend=foo.so -vV` to look for `oo.so` instead of `foo.so`
  • Loading branch information
GuillaumeGomez committed Jul 29, 2021
2 parents 8233a21 + 2f6662d commit 1e2eb9f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions compiler/rustc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -764,13 +764,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
println!("release: {}", unw(util::release_str()));

let debug_flags = matches.opt_strs("Z");
let backend_name = debug_flags.iter().find_map(|x| {
if x.starts_with("codegen-backend=") {
Some(&x["codegen-backends=".len()..])
} else {
None
}
});
let backend_name = debug_flags.iter().find_map(|x| x.strip_prefix("codegen-backend="));
get_codegen_backend(&None, backend_name).print_version();
}
}
Expand Down

0 comments on commit 1e2eb9f

Please sign in to comment.