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

Update doc for detecting changes/upgrades of compilers #1218

Merged
merged 1 commit into from
Sep 30, 2024
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
11 changes: 11 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,17 @@ impl Build {
/// Define whether metadata should be emitted for cargo to detect environment
/// changes that should trigger a rebuild.
///
/// NOTE that cc does not emit metadata to detect changes for `PATH`, since it could
/// be changed every comilation yet does not affect the result of compilation
/// (i.e. rust-analyzer adds temporary directory to `PATH`).
///
/// cc in general, has no way detecting changes to compiler, as there are so many ways to
/// change it and sidestep the detection, for example the compiler might be wrapped in a script
/// so detecting change of the file, or using checksum won't work.
///
/// We recommend users to decide for themselves, if they want rebuild if the compiler has been upgraded
/// or changed, and how to detect that.
///
/// This has no effect if the `cargo_metadata` option is `false`.
///
/// This option defaults to `true`.
Expand Down