Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not let cc-rs trigger a rebuild any time the env changes #413

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ fn new_build() -> cc::Build {
if !is_windows_msvc() {
build.flag("-std=c11");
}
// Do NOT trigger a rebuild any time the env changes (e.g. $PATH).
// This prevents all downstream crates from being rebuilt when `cargo check`
// or `cargo build` are run in different environments, like Rust Analyzer
// vs. in the terminal vs. in a Git pre-commit hook.
build.emit_rerun_if_env_changed(false);
build
}

Expand Down