@@ -1595,11 +1595,10 @@ macro_rules! supported_targets {
1595
1595
pub const TARGETS : & [ & str ] = & [ $( $tuple) ,+] ;
1596
1596
1597
1597
fn load_builtin( target: & str ) -> Option <Target > {
1598
- let mut t = match target {
1598
+ let t = match target {
1599
1599
$( $tuple => targets:: $module:: target( ) , ) +
1600
1600
_ => return None ,
1601
1601
} ;
1602
- t. is_builtin = true ;
1603
1602
debug!( "got builtin target: {:?}" , t) ;
1604
1603
Some ( t)
1605
1604
}
@@ -2128,9 +2127,6 @@ type StaticCow<T> = Cow<'static, T>;
2128
2127
/// through `Deref` impls.
2129
2128
#[ derive( PartialEq , Clone , Debug ) ]
2130
2129
pub struct TargetOptions {
2131
- /// Whether the target is built-in or loaded from a custom target specification.
2132
- pub is_builtin : bool ,
2133
-
2134
2130
/// Used as the `target_endian` `cfg` variable. Defaults to little endian.
2135
2131
pub endian : Endian ,
2136
2132
/// Width of c_int type. Defaults to "32".
@@ -2606,7 +2602,6 @@ impl Default for TargetOptions {
2606
2602
/// incomplete, and if used for compilation, will certainly not work.
2607
2603
fn default ( ) -> TargetOptions {
2608
2604
TargetOptions {
2609
- is_builtin : false ,
2610
2605
endian : Endian :: Little ,
2611
2606
c_int_width : "32" . into ( ) ,
2612
2607
os : "none" . into ( ) ,
@@ -3349,7 +3344,6 @@ impl Target {
3349
3344
}
3350
3345
}
3351
3346
3352
- key ! ( is_builtin, bool ) ;
3353
3347
key ! ( c_int_width = "target-c-int-width" ) ;
3354
3348
key ! ( c_enum_min_bits, Option <u64 >) ; // if None, matches c_int_width
3355
3349
key ! ( os) ;
@@ -3462,10 +3456,6 @@ impl Target {
3462
3456
key ! ( entry_abi, Conv ) ?;
3463
3457
key ! ( supports_xray, bool ) ;
3464
3458
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
- }
3469
3459
base. update_from_cli ( ) ;
3470
3460
3471
3461
// Each field should have been read using `Json::remove` so any keys remaining are unused.
@@ -3635,7 +3625,6 @@ impl ToJson for Target {
3635
3625
target_val ! ( arch) ;
3636
3626
target_val ! ( data_layout) ;
3637
3627
3638
- target_option_val ! ( is_builtin) ;
3639
3628
target_option_val ! ( endian, "target-endian" ) ;
3640
3629
target_option_val ! ( c_int_width, "target-c-int-width" ) ;
3641
3630
target_option_val ! ( os) ;
0 commit comments