about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-06-30 20:49:40 +0200
committerGitHub <noreply@github.com>2025-06-30 20:49:40 +0200
commit8b8cd35edc64232ceff8e8e2e770618e0261127c (patch)
treea53fd762f609ccd61965ae2c304104762964f12b /compiler/rustc_driver_impl
parentc65dccabacdfd6c8a7f7439eba13422fdd89b91e (diff)
parentbb65bc8cba7a7cd6839244cebeb694937f473d0a (diff)
downloadrust-8b8cd35edc64232ceff8e8e2e770618e0261127c.tar.gz
rust-8b8cd35edc64232ceff8e8e2e770618e0261127c.zip
Rollup merge of #143019 - danielframpton:codegen-backend-parse, r=bjorn3
Ensure -V --verbose processes both codegen_backend and codegen-backend
Diffstat (limited to 'compiler/rustc_driver_impl')
-rw-r--r--compiler/rustc_driver_impl/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs
index 4855fc58d03..18490385455 100644
--- a/compiler/rustc_driver_impl/src/lib.rs
+++ b/compiler/rustc_driver_impl/src/lib.rs
@@ -1112,7 +1112,9 @@ fn get_backend_from_raw_matches(
     matches: &Matches,
 ) -> Box<dyn CodegenBackend> {
     let debug_flags = matches.opt_strs("Z");
-    let backend_name = debug_flags.iter().find_map(|x| x.strip_prefix("codegen-backend="));
+    let backend_name = debug_flags
+        .iter()
+        .find_map(|x| x.strip_prefix("codegen-backend=").or(x.strip_prefix("codegen_backend=")));
     let target = parse_target_triple(early_dcx, matches);
     let sysroot = Sysroot::new(matches.opt_str("sysroot").map(PathBuf::from));
     let target = config::build_target_config(early_dcx, &target, sysroot.path());