Skip to content

Commit

Permalink
scudo-sys: Fix rerun-if-changed typo (#6)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
denniskempin authored Oct 21, 2022
1 parent e45e770 commit 8644d13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scudo-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "scudo-sys"
version = "0.2.1"
version = "0.2.2"
edition = "2018"
license = "Apache-2.0"
readme = "README.md"
Expand Down
6 changes: 4 additions & 2 deletions scudo-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ extern crate cc;
use std::fs::read_dir;
use std::path::Path;

const SCUDO_RUST_WRAPPER: &str = "src/scudo_rust_wrapper.cpp";

fn main() {
println!("cargo:rerun-if-changed=src/scudo_rust_wrapper.c");
println!("cargo:rerun-if-changed={}", SCUDO_RUST_WRAPPER);
let scudo_dir = Path::new("scudo-standalone");

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

cc::Build::new()
.files(scudo_cpp_files)
.file("src/scudo_rust_wrapper.cpp")
.file(SCUDO_RUST_WRAPPER)
.include(scudo_dir)
.include(scudo_dir.join("include"))
.cpp(true)
Expand Down

0 comments on commit 8644d13

Please sign in to comment.