Skip to content

Commit e53eba3

Browse files
authored
Add comment explaining why cc does not rebuild on env PATH change (#1247)
1 parent 9aab242 commit e53eba3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3736,6 +3736,8 @@ impl Build {
37363736
if let Some(val) = self.env_cache.read().unwrap().get(v).cloned() {
37373737
return val;
37383738
}
3739+
// Excluding `PATH` prevents spurious rebuilds on Windows, see
3740+
// <https://github.com/rust-lang/cc-rs/pull/1215> for details.
37393741
if self.emit_rerun_if_env_changed && !provided_by_cargo(v) && v != "PATH" {
37403742
self.cargo_output
37413743
.print_metadata(&format_args!("cargo:rerun-if-env-changed={}", v));

0 commit comments

Comments
 (0)