about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-08-27 15:41:46 +1000
committerZalathar <Zalathar@users.noreply.github.com>2024-08-27 17:30:42 +1000
commit5b6ff4fe18e4294ac2180325cdb46494a051706c (patch)
treee2272f4459f06db046de048b951f22072d8a7a22
parent7f90aa5538454c226b664ed882729e5f24251bd4 (diff)
downloadrust-5b6ff4fe18e4294ac2180325cdb46494a051706c.tar.gz
rust-5b6ff4fe18e4294ac2180325cdb46494a051706c.zip
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.
-rw-r--r--library/profiler_builtins/build.rs10
1 files 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());