Skip to content

Commit

Permalink
Update doc for detecting changes/upgrades of compilers (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
NobodyXu committed Sep 30, 2024
1 parent 5f5e1c8 commit e6a87a6
Showing 1 changed file with 11 additions and 0 deletions.
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

0 comments on commit e6a87a6

Please sign in to comment.