8
8
//! In theory if we get past this phase it's a bug if a build fails, but in
9
9
//! practice that's likely not true!
10
10
11
- use std:: collections:: HashMap ;
12
- #[ cfg( not( feature = "bootstrap-self-test" ) ) ]
13
- use std:: collections:: HashSet ;
11
+ use std:: collections:: { HashMap , HashSet } ;
14
12
use std:: ffi:: { OsStr , OsString } ;
15
13
use std:: path:: PathBuf ;
16
14
use std:: { env, fs} ;
@@ -34,7 +32,6 @@ pub struct Finder {
34
32
// it might not yet be included in stage0. In such cases, we handle the targets missing from stage0 in this list.
35
33
//
36
34
// Targets can be removed from this list once they are present in the stage0 compiler (usually by updating the beta compiler of the bootstrap).
37
- #[ cfg( not( feature = "bootstrap-self-test" ) ) ]
38
35
const STAGE0_MISSING_TARGETS : & [ & str ] = & [
39
36
// just a dummy comment so the list doesn't get onelined
40
37
] ;
@@ -205,7 +202,6 @@ than building it.
205
202
. map ( |p| cmd_finder. must_have ( p) )
206
203
. or_else ( || cmd_finder. maybe_have ( "reuse" ) ) ;
207
204
208
- #[ cfg( not( feature = "bootstrap-self-test" ) ) ]
209
205
let stage0_supported_target_list: HashSet < String > = crate :: utils:: helpers:: output (
210
206
command ( & build. config . initial_rustc ) . args ( [ "--print" , "target-list" ] ) . as_command_mut ( ) ,
211
207
)
@@ -234,8 +230,7 @@ than building it.
234
230
}
235
231
236
232
// Ignore fake targets that are only used for unit tests in bootstrap.
237
- #[ cfg( not( feature = "bootstrap-self-test" ) ) ]
238
- {
233
+ if cfg ! ( not( feature = "bootstrap-self-test" ) ) && !skip_target_sanity {
239
234
let mut has_target = false ;
240
235
let target_str = target. to_string ( ) ;
241
236
0 commit comments