Generate deps file for rust_bindgen modules.
Bug: 162007475
Test: deps file generated containing the dependent header files.
Change-Id: I4abaf8e76875f7657c1b8386749217adcba1ffa2
diff --git a/rust/bindgen.go b/rust/bindgen.go
index 132b1fd..099bc6e 100644
--- a/rust/bindgen.go
+++ b/rust/bindgen.go
@@ -41,8 +41,10 @@
bindgen = pctx.AndroidStaticRule("bindgen",
blueprint.RuleParams{
Command: "CLANG_PATH=$bindgenClang LIBCLANG_PATH=$bindgenLibClang RUSTFMT=${config.RustBin}/rustfmt " +
- "$bindgenCmd $flags $in -o $out -- $cflags",
+ "$bindgenCmd $flags $in -o $out -- -MD -MF $out.d $cflags",
CommandDeps: []string{"$bindgenCmd"},
+ Deps: blueprint.DepsGCC,
+ Depfile: "$out.d",
},
"flags", "cflags")
)