File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ pub struct Config {
7878 pub channel : String ,
7979 pub musl_root : Option < PathBuf > ,
8080 pub prefix : Option < String > ,
81+ pub codegen_tests : bool ,
8182}
8283
8384/// Per-target configuration stored in the global configuration structure.
@@ -169,6 +170,7 @@ impl Config {
169170 config. rust_codegen_units = 1 ;
170171 config. build = build. to_string ( ) ;
171172 config. channel = "dev" . to_string ( ) ;
173+ config. codegen_tests = true ;
172174
173175 let toml = file. map ( |file| {
174176 let mut f = t ! ( File :: open( & file) ) ;
@@ -322,6 +324,7 @@ impl Config {
322324 ( "DEBUGINFO_TESTS" , self . rust_debuginfo_tests) ,
323325 ( "LOCAL_REBUILD" , self . local_rebuild) ,
324326 ( "NINJA" , self . ninja) ,
327+ ( "CODEGEN_TESTS" , self . codegen_tests) ,
325328 }
326329
327330 match key {
Original file line number Diff line number Diff line change @@ -390,8 +390,10 @@ impl Build {
390390 "mir-opt" , "mir-opt" ) ;
391391 }
392392 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+ }
395397 }
396398 CheckCodegenUnits { compiler } => {
397399 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) {
8989
9090 // Externally configured LLVM requires FileCheck to exist
9191 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 {
9393 panic ! ( "filecheck executable {:?} does not exist" , filecheck) ;
9494 }
9595
You can’t perform that action at this time.
0 commit comments