@@ -103,6 +103,12 @@ impl Target {
103
103
base. $key_name = Some ( s) ;
104
104
}
105
105
} ) ;
106
+ ( $key_name: ident, Option <StaticCow <str >>) => ( {
107
+ let name = ( stringify!( $key_name) ) . replace( "_" , "-" ) ;
108
+ if let Some ( s) = obj. remove( & name) . and_then( |b| Some ( b. as_str( ) ?. to_string( ) ) ) {
109
+ base. $key_name = Some ( s. into( ) ) ;
110
+ }
111
+ } ) ;
106
112
( $key_name: ident, BinaryFormat ) => ( {
107
113
let name = ( stringify!( $key_name) ) . replace( "_" , "-" ) ;
108
114
obj. remove( & name) . and_then( |f| f. as_str( ) . and_then( |s| {
@@ -623,6 +629,7 @@ impl Target {
623
629
key ! ( stack_probes, StackProbeType ) ?;
624
630
key ! ( min_global_align, Option <u64 >) ;
625
631
key ! ( default_codegen_units, Option <u64 >) ;
632
+ key ! ( default_codegen_backend, Option <StaticCow <str >>) ;
626
633
key ! ( trap_unreachable, bool ) ;
627
634
key ! ( requires_lto, bool ) ;
628
635
key ! ( singlethread, bool ) ;
@@ -801,6 +808,7 @@ impl ToJson for Target {
801
808
target_option_val ! ( stack_probes) ;
802
809
target_option_val ! ( min_global_align) ;
803
810
target_option_val ! ( default_codegen_units) ;
811
+ target_option_val ! ( default_codegen_backend) ;
804
812
target_option_val ! ( trap_unreachable) ;
805
813
target_option_val ! ( requires_lto) ;
806
814
target_option_val ! ( singlethread) ;
0 commit comments