Prevent build.rs rerunning unnecessarily on all source changes

This commit is contained in:
David Tolnay
2022-12-12 14:37:41 -08:00
parent d493649f52
commit 4f157a8b81
5 changed files with 11 additions and 0 deletions
+2
View File
@@ -19,6 +19,8 @@ fn has_cargo_expand() -> bool {
}
fn main() {
println!("cargo:rerun-if-changed=build.rs");
if cfg!(feature = "expandtest") && has_cargo_expand() {
println!("cargo:rustc-cfg=expandtest");
}