Skip to content

Commit b17fa8b

Browse files
authored
Auto merge of #36055 - japaric:rustbuild-no-filecheck, r=alexcrichton
rustbuild: skip filecheck check if codegen tests are disabled to match the behavior of the old Makefile-based build system closes #35752 r? @alexcrichton
2 parents 78a0838 + b8ebc13 commit b17fa8b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/bootstrap/config.rs

+3
Original file line numberDiff line numberDiff 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 {

src/bootstrap/lib.rs

+4-2
Original file line numberDiff line numberDiff 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,

src/bootstrap/sanity.rs

+1-1
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)