@@ -478,6 +478,9 @@ pub struct TargetOptions {
478478
479479 /// Whether or not bitcode is embedded in object files
480480 pub embed_bitcode : bool ,
481+
482+ /// Whether a .debug_gdb_scripts section will be added to the output object file
483+ pub emit_debug_gdb_scripts : bool ,
481484}
482485
483486impl Default for TargetOptions {
@@ -550,6 +553,7 @@ impl Default for TargetOptions {
550553 codegen_backend : "llvm" . to_string ( ) ,
551554 default_hidden_visibility : false ,
552555 embed_bitcode : false ,
556+ emit_debug_gdb_scripts : true ,
553557 }
554558 }
555559}
@@ -799,6 +803,7 @@ impl Target {
799803 key ! ( codegen_backend) ;
800804 key ! ( default_hidden_visibility, bool ) ;
801805 key ! ( embed_bitcode, bool ) ;
806+ key ! ( emit_debug_gdb_scripts, bool ) ;
802807
803808 if let Some ( array) = obj. find ( "abi-blacklist" ) . and_then ( Json :: as_array) {
804809 for name in array. iter ( ) . filter_map ( |abi| abi. as_string ( ) ) {
@@ -1002,6 +1007,7 @@ impl ToJson for Target {
10021007 target_option_val ! ( codegen_backend) ;
10031008 target_option_val ! ( default_hidden_visibility) ;
10041009 target_option_val ! ( embed_bitcode) ;
1010+ target_option_val ! ( emit_debug_gdb_scripts) ;
10051011
10061012 if default. abi_blacklist != self . options . abi_blacklist {
10071013 d. insert ( "abi-blacklist" . to_string ( ) , self . options . abi_blacklist . iter ( )
0 commit comments