Build bindgen.sh inside android/Android.bp.
* Keep local build modules in android/Android.bp.
* Use cargo2anroid.py to generate ./Android.bp.
Test: make
Change-Id: Ibf60e4397eec50ccc52546fd147df49affecba84
diff --git a/Android.bp b/Android.bp
index c44f133..8f638fb 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,26 +1,4 @@
-// This file is generated by cargo2android.py --run --dependencies --features=clap,runtime,which-rustfmt.
-
-// Add bindgen.sh module and example.
-sh_binary_host {
- name: "bindgen.sh",
- src: "android/bindgen.sh",
-}
-
-// Example genrule module to call bindgen.sh:
-//
-// genrule {
-// name: "my_example",
-// tools: ["bindgen.sh", "bindgen"],
-// depfile: true,
-// srcs: ["src/my_example_wrapper.h"],
-// out: ["my_example.rs"],
-// cmd: "$(location)" + my_example_bindgen_flags
-// + common_bindgen_flags + my_example_clang_flags,
-// }
-//
-// The 'out' file is a rust module to be included into other rust crates.
-
-common_bindgen_flags = " -o $(out) $(in) -- -MD -MF $(depfile)"
+// This file is generated by cargo2android.py --run --dependencies --features=clap,runtime,which-rustfmt --host-first-multilib.
rust_binary_host {
name: "bindgen",
@@ -51,6 +29,7 @@
"libshlex",
"libwhich",
],
+ compile_multilib: "first",
}
rust_library_host {
@@ -81,7 +60,7 @@
"libshlex",
"libwhich",
],
- compile_multilib: "first", // added
+ compile_multilib: "first",
}
// dependent_library ["feature_list"]