Skip to content

Commit 742e536

Browse files
Update compiler/rustc_driver_impl/src/lib.rs
Co-authored-by: bjorn3 <[email protected]>
1 parent 0b54351 commit 742e536

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

compiler/rustc_driver_impl/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,8 +1113,7 @@ fn get_backend_from_raw_matches(
11131113
) -> Box<dyn CodegenBackend> {
11141114
let debug_flags = matches.opt_strs("Z");
11151115
let backend_name = debug_flags.iter().find_map(|x| {
1116-
x.strip_prefix("codegen")
1117-
.and_then(|x| x.strip_prefix("-backend=").or_else(|| x.strip_prefix("_backend=")))
1116+
x.strip_prefix("codegen-backend=").or(x.strip_prefix("codegen_backend="))
11181117
});
11191118
let target = parse_target_triple(early_dcx, matches);
11201119
let sysroot = filesearch::materialize_sysroot(matches.opt_str("sysroot").map(PathBuf::from));

0 commit comments

Comments
 (0)