File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ fn main() {
28
28
.file("foo.c")
29
29
.file("bar.c")
30
30
.compile("foo");
31
+ println!("cargo:rerun-if-changed=foo.c");
32
+ println!("cargo:rerun-if-changed=bar.c");
31
33
}
32
34
```
33
35
@@ -101,6 +103,10 @@ functions with hard requirements on some variables supplied by [cargo's
101
103
build-script driver] [ cargo ] that it has the ` TARGET ` , ` OUT_DIR ` , ` OPT_LEVEL ` ,
102
104
and ` HOST ` variables.
103
105
106
+ Note that ` cc-rs ` does not automatically tell cargo to rebuild when the c files
107
+ are changed, nor the environment variables such as CFLAGS. See the example to
108
+ manually instruct cargo to rebuild when the source files change.
109
+
104
110
[ cargo ] : https://doc.rust-lang.org/cargo/reference/build-scripts.html#inputs-to-the-build-script
105
111
106
112
## Optional features
You can’t perform that action at this time.
0 commit comments