Skip to content

Commit 8644d13

Browse files
authored
scudo-sys: Fix rerun-if-changed typo (#6)
The file specified does not exist, so cargo will re-run the build.rs file on every single build. TEST=cargo build && cargo build second run will use cached results.
1 parent e45e770 commit 8644d13

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

scudo-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "scudo-sys"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
edition = "2018"
55
license = "Apache-2.0"
66
readme = "README.md"

scudo-sys/build.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ extern crate cc;
1616
use std::fs::read_dir;
1717
use std::path::Path;
1818

19+
const SCUDO_RUST_WRAPPER: &str = "src/scudo_rust_wrapper.cpp";
20+
1921
fn main() {
20-
println!("cargo:rerun-if-changed=src/scudo_rust_wrapper.c");
22+
println!("cargo:rerun-if-changed={}", SCUDO_RUST_WRAPPER);
2123
let scudo_dir = Path::new("scudo-standalone");
2224

2325
// Get all .cpp files besides the wrappers.
@@ -34,7 +36,7 @@ fn main() {
3436

3537
cc::Build::new()
3638
.files(scudo_cpp_files)
37-
.file("src/scudo_rust_wrapper.cpp")
39+
.file(SCUDO_RUST_WRAPPER)
3840
.include(scudo_dir)
3941
.include(scudo_dir.join("include"))
4042
.cpp(true)

0 commit comments

Comments
 (0)