Skip to content

Commit 38ed4e5

Browse files
authored
Rollup merge of #112109 - Alexendoo:unsupported-split-debuginfo, r=b-naber
Don't print unsupported split-debuginfo modes with `-Zunstable-options` Currently unsupported `split-debuginfo` options are enabled by `-Zunstable-options`, for projects that have `-Zunstable-options` for other reasons this can be [an unexpected interaction](rust-lang/rust-clippy#10516 (comment)) This PR makes it so that `--print split-debuginfo -Zunstable-options` doesn't print unsupported modes, so that a cargo config of e.g. ```toml [profile.dev] split-debuginfo = "unpacked" ``` Would not cause an unsupported mode to be enabled on `x86_64-pc-windows-msvc`
2 parents c451f7b + fda3c9f commit 38ed4e5

File tree

1 file changed

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

1 file changed

+1
-3
lines changed

compiler/rustc_driver_impl/src/lib.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,7 @@ fn print_crate_info(
771771
use rustc_target::spec::SplitDebuginfo::{Off, Packed, Unpacked};
772772

773773
for split in &[Off, Packed, Unpacked] {
774-
let stable = sess.target.options.supported_split_debuginfo.contains(split);
775-
let unstable_ok = sess.unstable_options();
776-
if stable || unstable_ok {
774+
if sess.target.options.supported_split_debuginfo.contains(split) {
777775
safe_println!("{split}");
778776
}
779777
}

0 commit comments

Comments
 (0)