@@ -84,12 +84,16 @@ fn main() {
|
84 | 84 | let root = Path::new("../../src/llvm-project/compiler-rt"); |
85 | 85 | |
86 | 86 | let src_root = root.join("lib").join("profile"); |
| 87 | +assert!(src_root.exists(), "profiler runtime source directory not found: {src_root:?}"); |
| 88 | +let mut n_sources_found = 0u32; |
87 | 89 | for src in profile_sources { |
88 | 90 | let path = src_root.join(src); |
89 | 91 | if path.exists() { |
90 | 92 | cfg.file(path); |
| 93 | + n_sources_found += 1; |
91 | 94 | } |
92 | 95 | } |
| 96 | +assert!(n_sources_found > 0, "couldn't find any profiler runtime source files in {src_root:?}"); |
93 | 97 | |
94 | 98 | cfg.include(root.join("include")); |
95 | 99 | cfg.warnings(false); |
|