blob: 7bfea3ff4810dfcb4a11b0cefeea18b2b095014c [file] [log] [blame]
Jooyung Hanc8deb472021-09-13 13:48:25 +09001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
Pierre-Clément Tosi69467e02023-02-01 13:35:15 +00005rust_defaults {
6 name: "libavb_bindgen.defaults",
Jooyung Hanc8deb472021-09-13 13:48:25 +09007 wrapper_src: "bindgen/avb.h",
8 crate_name: "avb_bindgen",
Alan Stokes6472ccd2022-08-31 13:41:28 +01009 edition: "2021",
Matthew Maurerf73794d2022-07-29 09:04:03 -070010 visibility: ["//packages/modules/Virtualization:__subpackages__"],
Jooyung Hanc8deb472021-09-13 13:48:25 +090011 source_stem: "bindings",
12 bindgen_flags: [
13 "--size_t-is-usize",
Alice Wangdc63fe02022-12-15 08:49:57 +000014 "--default-enum-style rust",
Jooyung Hanc8deb472021-09-13 13:48:25 +090015 "--allowlist-function=.*",
Alice Wangf2752862023-01-18 11:51:25 +000016 "--allowlist-var=AVB.*",
Alice Wang28cbcf12022-12-01 07:58:28 +000017 "--use-core",
18 "--raw-line=#![no_std]",
19 "--ctypes-prefix=core::ffi",
Jooyung Hanc8deb472021-09-13 13:48:25 +090020 ],
Pierre-Clément Tosi69467e02023-02-01 13:35:15 +000021 cflags: ["-DBORINGSSL_NO_CXX"],
22}
23
24rust_bindgen {
25 name: "libavb_bindgen",
26 defaults: ["libavb_bindgen.defaults"],
27 host_supported: true,
Jooyung Hanc8deb472021-09-13 13:48:25 +090028 static_libs: [
Pierre-Clément Tosi69467e02023-02-01 13:35:15 +000029 "libavb",
Jooyung Hanc8deb472021-09-13 13:48:25 +090030 ],
31 shared_libs: [
32 "libcrypto",
33 ],
Pierre-Clément Tosi69467e02023-02-01 13:35:15 +000034}
35
36rust_bindgen {
37 name: "libavb_bindgen_nostd",
38 defaults: ["libavb_bindgen.defaults"],
39 static_libs: [
40 "libavb_baremetal",
41 "libcrypto_baremetal",
42 ],
Jooyung Hanc8deb472021-09-13 13:48:25 +090043}
44
45rust_test {
46 name: "libavb_bindgen_test",
47 srcs: [":libavb_bindgen"],
48 crate_name: "avb_bindgen_test",
Alan Stokes6472ccd2022-08-31 13:41:28 +010049 edition: "2021",
Jooyung Hanc8deb472021-09-13 13:48:25 +090050 test_suites: ["general-tests"],
51 auto_gen_config: true,
52 clippy_lints: "none",
53 lints: "none",
54}