File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ pub struct Config {
78
78
pub channel : String ,
79
79
pub musl_root : Option < PathBuf > ,
80
80
pub prefix : Option < String > ,
81
+ pub codegen_tests : bool ,
81
82
}
82
83
83
84
/// Per-target configuration stored in the global configuration structure.
@@ -169,6 +170,7 @@ impl Config {
169
170
config. rust_codegen_units = 1 ;
170
171
config. build = build. to_string ( ) ;
171
172
config. channel = "dev" . to_string ( ) ;
173
+ config. codegen_tests = true ;
172
174
173
175
let toml = file. map ( |file| {
174
176
let mut f = t ! ( File :: open( & file) ) ;
@@ -322,6 +324,7 @@ impl Config {
322
324
( "DEBUGINFO_TESTS" , self . rust_debuginfo_tests) ,
323
325
( "LOCAL_REBUILD" , self . local_rebuild) ,
324
326
( "NINJA" , self . ninja) ,
327
+ ( "CODEGEN_TESTS" , self . codegen_tests) ,
325
328
}
326
329
327
330
match key {
Original file line number Diff line number Diff line change @@ -390,8 +390,10 @@ impl Build {
390
390
"mir-opt" , "mir-opt" ) ;
391
391
}
392
392
CheckCodegen { compiler } => {
393
- check:: compiletest ( self , & compiler, target. target ,
394
- "codegen" , "codegen" ) ;
393
+ if self . config . codegen_tests {
394
+ check:: compiletest ( self , & compiler, target. target ,
395
+ "codegen" , "codegen" ) ;
396
+ }
395
397
}
396
398
CheckCodegenUnits { compiler } => {
397
399
check:: compiletest ( self , & compiler, target. target ,
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ pub fn check(build: &mut Build) {
89
89
90
90
// Externally configured LLVM requires FileCheck to exist
91
91
let filecheck = build. llvm_filecheck ( & build. config . build ) ;
92
- if !filecheck. starts_with ( & build. out ) && !filecheck. exists ( ) {
92
+ if !filecheck. starts_with ( & build. out ) && !filecheck. exists ( ) && build . config . codegen_tests {
93
93
panic ! ( "filecheck executable {:?} does not exist" , filecheck) ;
94
94
}
95
95
You can’t perform that action at this time.
0 commit comments