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
+3
View File
@@ -1,6 +1,9 @@
use std::path::Path;
fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=src/mod.rs");
// Sometimes on Windows the git checkout does not correctly wire up the
// symlink from serde_derive_internals/src to serde_derive/src/internals.
// When this happens we'll just build based on relative paths within the git