Skip to content

Commit 8b8cd35

Browse files
authored
Rollup merge of #143019 - danielframpton:codegen-backend-parse, r=bjorn3
Ensure -V --verbose processes both codegen_backend and codegen-backend
2 parents c65dcca + bb65bc8 commit 8b8cd35

File tree

1 file changed

+3
-1
lines changed
  • compiler/rustc_driver_impl/src

1 file changed

+3
-1
lines changed

compiler/rustc_driver_impl/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,9 @@ fn get_backend_from_raw_matches(
11121112
matches: &Matches,
11131113
) -> Box<dyn CodegenBackend> {
11141114
let debug_flags = matches.opt_strs("Z");
1115-
let backend_name = debug_flags.iter().find_map(|x| x.strip_prefix("codegen-backend="));
1115+
let backend_name = debug_flags
1116+
.iter()
1117+
.find_map(|x| x.strip_prefix("codegen-backend=").or(x.strip_prefix("codegen_backend=")));
11161118
let target = parse_target_triple(early_dcx, matches);
11171119
let sysroot = Sysroot::new(matches.opt_str("sysroot").map(PathBuf::from));
11181120
let target = config::build_target_config(early_dcx, &target, sysroot.path());

0 commit comments

Comments
 (0)