-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathbuild.rs
More file actions
30 lines (25 loc) · 689 Bytes
/
Copy pathbuild.rs
File metadata and controls
30 lines (25 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use cc::Build;
use walkdir::WalkDir;
fn main() {
let mut cfg = Build::new();
cfg.define("COMPILER_RT_HAS_ATOMICS", "1");
let sources = [
"c/InstrProfiling.c",
"c/InstrProfilingBuffer.c",
"c/InstrProfilingInternal.c",
"c/InstrProfilingMerge.c",
"c/InstrProfilingPlatformLinux.c",
"c/InstrProfilingWriter.c",
"c/InstrProfilingVersionVar.c",
];
for source in &sources {
cfg.file(source);
}
cfg.compile("llvm_profiler_runtime");
for entry in WalkDir::new("c") {
println!(
"cargo:rerun-if-changed={}",
entry.unwrap().path().to_str().unwrap()
);
}
}