File tree 1 file changed +5
-1
lines changed 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -333,9 +333,13 @@ fn bindgen_grpc(mut config: bindgen::Builder, file_path: &PathBuf) {
333
333
fn config_binding_path ( config : bindgen:: Builder ) {
334
334
let file_path: PathBuf ;
335
335
let target = env:: var ( "TARGET" ) . unwrap ( ) ;
336
- println ! ( "cargo:rerun-if-changed=bindings/{}-bindings.rs" , & target) ;
337
336
match target. as_str ( ) {
338
337
"x86_64-unknown-linux-gnu" | "aarch64-unknown-linux-gnu" => {
338
+ // Cargo treats nonexistent files changed, so we only emit the rerun-if-changed
339
+ // directive when we expect the target-specific pre-generated binding file to be
340
+ // present.
341
+ println ! ( "cargo:rerun-if-changed=bindings/{}-bindings.rs" , & target) ;
342
+
339
343
file_path = PathBuf :: from ( env:: var ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) )
340
344
. join ( "bindings" )
341
345
. join ( format ! ( "{}-bindings.rs" , & target) ) ;
You can’t perform that action at this time.
0 commit comments