summaryrefslogtreecommitdiff
path: root/rust/bindgen.go
diff options
context:
space:
mode:
author Ivan Lozano <ivanlozano@google.com> 2020-07-23 12:41:58 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-07-23 12:41:58 +0000
commitf90e64a34f9c4c33eada4fe5469250d7b8707dbf (patch)
tree3cbff9e376d9be9a8465dedf778cb52f6ab742d6 /rust/bindgen.go
parenta71cf8685319c4a4de801c0f2fcd00bb071f8753 (diff)
parentec54eec571eb1b38cc8e56dc1eb8e08d53f86472 (diff)
Merge "Call rustfmt on rust_bindgen bindings."
Diffstat (limited to 'rust/bindgen.go')
-rw-r--r--rust/bindgen.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/rust/bindgen.go b/rust/bindgen.go
index 0f657ef5a..132b1fdb3 100644
--- a/rust/bindgen.go
+++ b/rust/bindgen.go
@@ -24,7 +24,7 @@ import (
)
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 @@ var (
//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")