From 5b6ff4fe18e4294ac2180325cdb46494a051706c Mon Sep 17 00:00:00 2001 From: Zalathar Date: Tue, 27 Aug 2024 15:41:46 +1000 Subject: [PATCH] Don't skip nonexistent source files This behaviour was introduced during the upgrade to LLVM 11. Now that the list of source files has been cleaned up, we can reasonably expect _all_ of the listed source files to be present. --- library/profiler_builtins/build.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/library/profiler_builtins/build.rs b/library/profiler_builtins/build.rs index bf4a1749322..dd85239fa8c 100644 --- a/library/profiler_builtins/build.rs +++ b/library/profiler_builtins/build.rs @@ -85,15 +85,9 @@ fn main() { let src_root = root.join("lib").join("profile"); assert!(src_root.exists(), "profiler runtime source directory not found: {src_root:?}"); println!("cargo::rerun-if-changed={}", src_root.display()); - let mut n_sources_found = 0u32; - for src in profile_sources { - let path = src_root.join(src); - if path.exists() { - cfg.file(path); - n_sources_found += 1; - } + for file in profile_sources { + cfg.file(src_root.join(file)); } - assert!(n_sources_found > 0, "couldn't find any profiler runtime source files in {src_root:?}"); let include = root.join("include"); println!("cargo::rerun-if-changed={}", include.display());