@@ -269,6 +269,7 @@ macro_rules! options {
269
269
pub const parse_switch_with_opt_path: & str =
270
270
"an optional path to the profiling data output directory" ;
271
271
pub const parse_merge_functions: & str = "one of: `disabled`, `trampolines`, or `aliases`" ;
272
+ pub const parse_split_dwarf_kind: & str = "one of: `none`, `single` or `split`" ;
272
273
pub const parse_symbol_mangling_version: & str = "either `legacy` or `v0` (RFC 2603)" ;
273
274
pub const parse_src_file_hash: & str = "either `md5` or `sha1`" ;
274
275
pub const parse_relocation_model: & str =
@@ -676,6 +677,19 @@ macro_rules! options {
676
677
true
677
678
}
678
679
680
+ fn parse_split_dwarf_kind(
681
+ slot: & mut SplitDwarfKind ,
682
+ v: Option <& str >,
683
+ ) -> bool {
684
+ * slot = match v {
685
+ Some ( "none" ) => SplitDwarfKind :: None ,
686
+ Some ( "split" ) => SplitDwarfKind :: Split ,
687
+ Some ( "single" ) => SplitDwarfKind :: Single ,
688
+ _ => return false ,
689
+ } ;
690
+ true
691
+ }
692
+
679
693
fn parse_symbol_mangling_version(
680
694
slot: & mut Option <SymbolManglingVersion >,
681
695
v: Option <& str >,
@@ -1088,6 +1102,11 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
1088
1102
"hash algorithm of source files in debug info (`md5`, `sha1`, or `sha256`)" ) ,
1089
1103
strip: Strip = ( Strip :: None , parse_strip, [ UNTRACKED ] ,
1090
1104
"tell the linker which information to strip (`none` (default), `debuginfo` or `symbols`)" ) ,
1105
+ split_dwarf: SplitDwarfKind = ( SplitDwarfKind :: None , parse_split_dwarf_kind, [ UNTRACKED ] ,
1106
+ "enable generation of split dwarf" ) ,
1107
+ split_dwarf_inlining: bool = ( true , parse_bool, [ UNTRACKED ] ,
1108
+ "provide minimal debug info in the object/executable to facilitate online \
1109
+ symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF") ,
1091
1110
symbol_mangling_version: Option <SymbolManglingVersion > = ( None ,
1092
1111
parse_symbol_mangling_version, [ TRACKED ] ,
1093
1112
"which mangling version to use for symbol names ('legacy' (default) or 'v0')" ) ,
0 commit comments