diff options
| author | Kamil Koczurek <koczurekk@gmail.com> | 2022-11-07 15:21:35 +0100 |
|---|---|---|
| committer | Kamil Koczurek <koczurekk@gmail.com> | 2022-11-07 16:11:32 +0100 |
| commit | 4c3cad062014253452a15574868e49328486ec02 (patch) | |
| tree | 85fc99d9f3892da4cf89ef8ce722485130bc71d1 /compiler/rustc_driver/src/lib.rs | |
| parent | 391ba78ab442610a63310b9a3d24646082628081 (diff) | |
| download | rust-4c3cad062014253452a15574868e49328486ec02.tar.gz rust-4c3cad062014253452a15574868e49328486ec02.zip | |
Add --print=split-debuginfo
This option prints all supported values for -Csplit-debuginfo=.., i.e. only stable ones on stable/beta and all of them on nightly/dev.
Diffstat (limited to 'compiler/rustc_driver/src/lib.rs')
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index cf4bcc7c158..423f0cdddfd 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -736,6 +736,17 @@ fn print_crate_info( // Any output here interferes with Cargo's parsing of other printed output NativeStaticLibs => {} LinkArgs => {} + SplitDebuginfo => { + use rustc_target::spec::SplitDebuginfo::{Off, Packed, Unpacked}; + + for split in &[Off, Packed, Unpacked] { + let stable = sess.target.options.supported_split_debuginfo.contains(split); + let unstable_ok = sess.unstable_options(); + if stable || unstable_ok { + println!("{}", split); + } + } + } } } Compilation::Stop |
