Skip to content

Commit c70d633

Browse files
author
Jorge Aparicio
committed
rustbuild: skip filecheck check if codegen tests are disabled
to match the behavior of the old Makefile-based build system closes #35752
1 parent 1194695 commit c70d633

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/bootstrap/config.rs

Lines changed: 3 additions & 0 deletions
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/sanity.rs

Lines changed: 1 addition & 1 deletion
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)