@@ -103,6 +103,12 @@ impl Target {
103103 base. $key_name = Some ( s) ;
104104 }
105105 } ) ;
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+ } ) ;
106112 ( $key_name: ident, BinaryFormat ) => ( {
107113 let name = ( stringify!( $key_name) ) . replace( "_" , "-" ) ;
108114 obj. remove( & name) . and_then( |f| f. as_str( ) . and_then( |s| {
@@ -623,6 +629,7 @@ impl Target {
623629 key ! ( stack_probes, StackProbeType ) ?;
624630 key ! ( min_global_align, Option <u64 >) ;
625631 key ! ( default_codegen_units, Option <u64 >) ;
632+ key ! ( default_codegen_backend, Option <StaticCow <str >>) ;
626633 key ! ( trap_unreachable, bool ) ;
627634 key ! ( requires_lto, bool ) ;
628635 key ! ( singlethread, bool ) ;
@@ -801,6 +808,7 @@ impl ToJson for Target {
801808 target_option_val ! ( stack_probes) ;
802809 target_option_val ! ( min_global_align) ;
803810 target_option_val ! ( default_codegen_units) ;
811+ target_option_val ! ( default_codegen_backend) ;
804812 target_option_val ! ( trap_unreachable) ;
805813 target_option_val ! ( requires_lto) ;
806814 target_option_val ! ( singlethread) ;
0 commit comments