Merge "Call rustfmt on rust_bindgen bindings."
diff --git a/rust/bindgen.go b/rust/bindgen.go
index 0f657ef..132b1fd 100644
--- a/rust/bindgen.go
+++ b/rust/bindgen.go
@@ -24,7 +24,7 @@
)
var (
- defaultBindgenFlags = []string{"--no-rustfmt-bindings"}
+ defaultBindgenFlags = []string{""}
// bindgen should specify its own Clang revision so updating Clang isn't potentially blocked on bindgen failures.
bindgenClangVersion = "clang-r383902c"
@@ -40,7 +40,8 @@
//TODO(ivanlozano) Switch this to RuleBuilder
bindgen = pctx.AndroidStaticRule("bindgen",
blueprint.RuleParams{
- Command: "CLANG_PATH=$bindgenClang LIBCLANG_PATH=$bindgenLibClang $bindgenCmd $flags $in -o $out -- $cflags",
+ Command: "CLANG_PATH=$bindgenClang LIBCLANG_PATH=$bindgenLibClang RUSTFMT=${config.RustBin}/rustfmt " +
+ "$bindgenCmd $flags $in -o $out -- $cflags",
CommandDeps: []string{"$bindgenCmd"},
},
"flags", "cflags")