File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ fn main() {
50
50
& objcopy,
51
51
& cargo,
52
52
) ;
53
+
54
+ // Inform cargo that we should rerun this on linker script changes
55
+ println ! ( "cargo:rerun-if-changed=linker.ld" ) ;
53
56
}
54
57
55
58
fn build_subproject (
@@ -126,4 +129,10 @@ fn build_subproject(
126
129
// Staticlibs can't be used as normal dependencies, they have to be linked by a build script
127
130
println ! ( "cargo:rustc-link-search=native={}" , & binary_dir. display( ) ) ;
128
131
println ! ( "cargo:rustc-link-lib=static={}" , & subproject_name) ;
132
+
133
+ // Inform cargo to rerun on source changes
134
+ //
135
+ // Cargo doesn't understand that the subcrates are part of the project because of how we build them, we have to tell it ourselves
136
+ println ! ( "cargo:rerun-if-changed={}" , & target_file_path) ;
137
+ println ! ( "cargo:rerun-if-changed={}" , & subproject_dir. display( ) ) ;
129
138
}
You can’t perform that action at this time.
0 commit comments