about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-30 22:36:52 +0000
committerbors <bors@rust-lang.org>2025-06-30 22:36:52 +0000
commitfdad98d7463eebcdca94716ec3036c38a8d66f50 (patch)
treea1810b7b03c4fba12d3ec7e740970320ad94b135 /compiler/rustc_driver_impl/src
parentf26e58023071e71636a3c72ac3a2bf89b1f76706 (diff)
parent3f6dc54f5c02f8000b3960615b95d830c1bb344e (diff)
downloadrust-fdad98d7463eebcdca94716ec3036c38a8d66f50.tar.gz
rust-fdad98d7463eebcdca94716ec3036c38a8d66f50.zip
Auto merge of #143254 - matthiaskrgr:rollup-7x8bxek, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#143019 (Ensure -V --verbose processes both codegen_backend and codegen-backend)
 - rust-lang/rust#143140 (give Pointer::into_parts a more scary name and offer a safer alternative)
 - rust-lang/rust#143175 (Make combining LLD with external LLVM config a hard error)
 - rust-lang/rust#143180 (Use `tracing-forest` instead of `tracing-tree` for bootstrap tracing)
 - rust-lang/rust#143223 (Improve macro stats printing)
 - rust-lang/rust#143228 (Handle build scripts better in `-Zmacro-stats` output.)
 - rust-lang/rust#143229 ([COMPILETEST-UNTANGLE 1/N] Move some some early config checks to the lib and move the compiletest binary)
 - rust-lang/rust#143246 (Subtree update of `rust-analyzer`)
 - rust-lang/rust#143248 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_driver_impl/src')
-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());