Skip to content

Commit d742e50

Browse files
committed
document the lack of automatic rebuilding after env var changes
Tracking issue: rust-lang#230
1 parent 02ed9e6 commit d742e50

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ functions with hard requirements on some variables supplied by [cargo's
8989
build-script driver][cargo] that it has the `TARGET`, `OUT_DIR`, `OPT_LEVEL`,
9090
and `HOST` variables.
9191

92+
Note that by default, changing these environment variables from one
93+
build to the next does not cause Cargo to rerun `build.rs`, and later
94+
builds may use stale artifacts. One workaround is to `touch build.rs`
95+
whenever you change these variables. You can also enable automatic
96+
rebuilding on a case-by-case basis with
97+
[`rerun-if-env-changed`](https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script).
98+
9299
[cargo]: http://doc.crates.io/build-script.html#inputs-to-the-build-script
93100

94101
## Optional features

0 commit comments

Comments
 (0)