From e56312e61a71f90c3d7fe9edbe817ec9a7584f4f Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 16 Sep 2021 10:43:36 -0700 Subject: [PATCH] Add "cargo:rerun-if-changed=build.rs" to some build.rs files. Add "cargo:rerun-if-changed=build.rs" in some build.rs files to tell cargo that it doesn't need to scan the whole package. See the [Cargo docs] for more info. [Cargo docs]: https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed --- crates/misc/run-examples/build.rs | 1 + crates/wasi-common/build.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/crates/misc/run-examples/build.rs b/crates/misc/run-examples/build.rs index 81caa36d69..a2c6171e4a 100644 --- a/crates/misc/run-examples/build.rs +++ b/crates/misc/run-examples/build.rs @@ -3,4 +3,5 @@ fn main() { "cargo:rustc-env=TARGET={}", std::env::var("TARGET").unwrap() ); + println!("cargo:rerun-if-changed=build.rs"); } diff --git a/crates/wasi-common/build.rs b/crates/wasi-common/build.rs index 236c48d19d..275d8dd6de 100644 --- a/crates/wasi-common/build.rs +++ b/crates/wasi-common/build.rs @@ -7,4 +7,6 @@ fn main() { println!("cargo:wasi={}", wasi.display()); // and available to our own crate as WASI_ROOT: println!("cargo:rustc-env=WASI_ROOT={}", wasi.display()); + // and this build.rs script doesn't depend on any files. + println!("cargo:rerun-if-changed=build.rs"); }