@@ -1595,11 +1595,10 @@ macro_rules! supported_targets {
15951595 pub const TARGETS : & [ & str ] = & [ $( $tuple) ,+] ;
15961596
15971597 fn load_builtin( target: & str ) -> Option <Target > {
1598- let mut t = match target {
1598+ let t = match target {
15991599 $( $tuple => targets:: $module:: target( ) , ) +
16001600 _ => return None ,
16011601 } ;
1602- t. is_builtin = true ;
16031602 debug!( "got builtin target: {:?}" , t) ;
16041603 Some ( t)
16051604 }
@@ -2128,9 +2127,6 @@ type StaticCow<T> = Cow<'static, T>;
21282127/// through `Deref` impls.
21292128#[ derive( PartialEq , Clone , Debug ) ]
21302129pub struct TargetOptions {
2131- /// Whether the target is built-in or loaded from a custom target specification.
2132- pub is_builtin : bool ,
2133-
21342130 /// Used as the `target_endian` `cfg` variable. Defaults to little endian.
21352131 pub endian : Endian ,
21362132 /// Width of c_int type. Defaults to "32".
@@ -2606,7 +2602,6 @@ impl Default for TargetOptions {
26062602 /// incomplete, and if used for compilation, will certainly not work.
26072603 fn default ( ) -> TargetOptions {
26082604 TargetOptions {
2609- is_builtin : false ,
26102605 endian : Endian :: Little ,
26112606 c_int_width : "32" . into ( ) ,
26122607 os : "none" . into ( ) ,
@@ -3349,7 +3344,6 @@ impl Target {
33493344 }
33503345 }
33513346
3352- key ! ( is_builtin, bool ) ;
33533347 key ! ( c_int_width = "target-c-int-width" ) ;
33543348 key ! ( c_enum_min_bits, Option <u64 >) ; // if None, matches c_int_width
33553349 key ! ( os) ;
@@ -3462,10 +3456,6 @@ impl Target {
34623456 key ! ( entry_abi, Conv ) ?;
34633457 key ! ( supports_xray, bool ) ;
34643458
3465- if base. is_builtin {
3466- // This can cause unfortunate ICEs later down the line.
3467- return Err ( "may not set is_builtin for targets not built-in" . into ( ) ) ;
3468- }
34693459 base. update_from_cli ( ) ;
34703460
34713461 // Each field should have been read using `Json::remove` so any keys remaining are unused.
@@ -3635,7 +3625,6 @@ impl ToJson for Target {
36353625 target_val ! ( arch) ;
36363626 target_val ! ( data_layout) ;
36373627
3638- target_option_val ! ( is_builtin) ;
36393628 target_option_val ! ( endian, "target-endian" ) ;
36403629 target_option_val ! ( c_int_width, "target-c-int-width" ) ;
36413630 target_option_val ! ( os) ;
0 commit comments