Skip to content

Commit e6a87a6

Browse files
authored
Update doc for detecting changes/upgrades of compilers (#1218)
1 parent 5f5e1c8 commit e6a87a6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,6 +1269,17 @@ impl Build {
12691269
/// Define whether metadata should be emitted for cargo to detect environment
12701270
/// changes that should trigger a rebuild.
12711271
///
1272+
/// NOTE that cc does not emit metadata to detect changes for `PATH`, since it could
1273+
/// be changed every comilation yet does not affect the result of compilation
1274+
/// (i.e. rust-analyzer adds temporary directory to `PATH`).
1275+
///
1276+
/// cc in general, has no way detecting changes to compiler, as there are so many ways to
1277+
/// change it and sidestep the detection, for example the compiler might be wrapped in a script
1278+
/// so detecting change of the file, or using checksum won't work.
1279+
///
1280+
/// We recommend users to decide for themselves, if they want rebuild if the compiler has been upgraded
1281+
/// or changed, and how to detect that.
1282+
///
12721283
/// This has no effect if the `cargo_metadata` option is `false`.
12731284
///
12741285
/// This option defaults to `true`.

0 commit comments

Comments
 (0)