mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
rustbuild: skip filecheck check if codegen tests are disabled
to match the behavior of the old Makefile-based build system closes #35752
This commit is contained in:
parent
11946956a6
commit
c70d633e94
@ -78,6 +78,7 @@ pub struct Config {
|
||||
pub channel: String,
|
||||
pub musl_root: Option<PathBuf>,
|
||||
pub prefix: Option<String>,
|
||||
pub codegen_tests: bool,
|
||||
}
|
||||
|
||||
/// Per-target configuration stored in the global configuration structure.
|
||||
@ -169,6 +170,7 @@ impl Config {
|
||||
config.rust_codegen_units = 1;
|
||||
config.build = build.to_string();
|
||||
config.channel = "dev".to_string();
|
||||
config.codegen_tests = true;
|
||||
|
||||
let toml = file.map(|file| {
|
||||
let mut f = t!(File::open(&file));
|
||||
@ -322,6 +324,7 @@ impl Config {
|
||||
("DEBUGINFO_TESTS", self.rust_debuginfo_tests),
|
||||
("LOCAL_REBUILD", self.local_rebuild),
|
||||
("NINJA", self.ninja),
|
||||
("CODEGEN_TESTS", self.codegen_tests),
|
||||
}
|
||||
|
||||
match key {
|
||||
|
@ -89,7 +89,7 @@ pub fn check(build: &mut Build) {
|
||||
|
||||
// Externally configured LLVM requires FileCheck to exist
|
||||
let filecheck = build.llvm_filecheck(&build.config.build);
|
||||
if !filecheck.starts_with(&build.out) && !filecheck.exists() {
|
||||
if !filecheck.starts_with(&build.out) && !filecheck.exists() && build.config.codegen_tests {
|
||||
panic!("filecheck executable {:?} does not exist", filecheck);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user