Merge "Rust bindgen: DiceInputValues alias and size_t-is_usize" am: 87be81258f am: 1214e6d637 am: 0e38e5944c am: e0c61458ed
Original change: https://android-review.googlesource.com/c/platform/external/open-dice/+/1921658
Change-Id: Idcf54451fd02bc061a3fdcd2baa84efc9aaa6d0b
diff --git a/Android.bp b/Android.bp
index 86fe55c..d25c5f9 100644
--- a/Android.bp
+++ b/Android.bp
@@ -153,6 +153,8 @@
// This makes the generated bindings much more concise and improves compilation
// time.
bindgen_flags: [
+ "--size_t-is-usize",
+
"--allowlist-function=DiceDeriveCdiPrivateKeySeed",
"--allowlist-function=DiceDeriveCdiCertificateId",
"--allowlist-function=DiceMainFlow",
@@ -193,6 +195,8 @@
// This makes the generated bindings much more concise and improves compilation
// time.
bindgen_flags: [
+ "--size_t-is-usize",
+
"--allowlist-function=BccFormatConfigDescriptor",
"--allowlist-function=BccMainFlow",
"--allowlist-function=BccHandoverMainFlow",
@@ -201,6 +205,16 @@
"--allowlist-var=BCC_INPUT_COMPONENT_NAME",
"--allowlist-var=BCC_INPUT_COMPONENT_VERSION",
"--allowlist-var=BCC_INPUT_RESETTABLE",
+
+ // Prevent DiceInputValues from being generated a second time and
+ // import it instead from open_dice_cbor_bindgen.
+ "--blocklist-type=DiceInputValues_",
+ "--blocklist-type=DiceInputValues",
+ "--raw-line", "pub use open_dice_cbor_bindgen::DiceInputValues;",
+ ],
+
+ rustlibs: [
+ "libopen_dice_cbor_bindgen",
],
// This is mainly to run layout tests for generated bindings on the host.
@@ -226,6 +240,11 @@
":libopen_dice_bcc_bindgen",
],
crate_name: "open_dice_bcc_bindgen_test",
+
+ rustlibs: [
+ "libopen_dice_cbor_bindgen",
+ ],
+
test_suites: ["general-tests"],
auto_gen_config: true,
clippy_lints: "none",