Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a6ac082

Browse files
committedOct 12, 2023
Remove some rerun-if-env-changed lines from build.rs. (#576)
Now that we appear to have a known-working fix for #526, we can investigate relaxing the fix. If #526 reappears, we now have a known-working state we can quickly revert to. Reports in #562 and #575 are that having rerun-if-env-changed=RUSTC and rerun-if-env-changed=RUSTC_WRAPPER are triggering spurious rebuilds in some situations, so remove these. In theory, cargo should already be aware of these environment variables. In practice, there were reports of build failures which had the appearance of using an older version of rustc with build.rs output from a newer version of rustc, and it wasn't clear what was happening. But, it's possible that #563 fixes the issue properly. So let's try removing these rerun-if-env-changed lines, and see if the problem resurfaces. And, rerun-if-env-changed=TARGET is explicitly documented as being unnecessary [here]. [here]: https://doc.rust-lang.org/cargo/reference/build-scripts.html
1 parent afb1601 commit a6ac082

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed
 

‎build.rs

-5
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ fn main() {
114114
println!("cargo:rerun-if-env-changed=CARGO_FEATURE_USE_LIBC");
115115
println!("cargo:rerun-if-env-changed=CARGO_FEATURE_RUSTC_DEP_OF_STD");
116116
println!("cargo:rerun-if-env-changed=CARGO_CFG_MIRI");
117-
println!("cargo:rerun-if-env-changed=CARGO_ENCODED_RUSTFLAGS");
118-
println!("cargo:rerun-if-env-changed=RUSTC");
119-
println!("cargo:rerun-if-env-changed=TARGET");
120-
println!("cargo:rerun-if-env-changed=RUSTC_WRAPPER");
121-
println!("cargo:rerun-if-env-changed=PROFILE");
122117
}
123118

124119
/// Link in the desired version of librustix_outline_{arch}.a, containing the

0 commit comments

Comments
 (0)
Please sign in to comment.