blob: 5a729f1b183307c89f03167c79b189c471ae96e5 [file] [log] [blame]
David Brazdil1baa9a92022-06-28 14:47:50 +01001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5rust_bindgen {
6 name: "liblibfdt_bindgen",
7 crate_name: "libfdt_bindgen",
8 wrapper_src: "bindgen/fdt.h",
9 source_stem: "bindings",
10 bindgen_flags: [
11 "--size_t-is-usize",
12 "--allowlist-type=fdt_.*",
13 "--allowlist-function=fdt_.*",
14 "--allowlist-var=FDT_.*",
15 "--use-core",
16 "--raw-line=#![no_std]",
17 "--ctypes-prefix=core::ffi",
18 ],
19 static_libs: [
20 "libfdt",
21 ],
22 apex_available: ["com.android.virt"],
23}
24
25rust_library_rlib {
26 name: "liblibfdt",
27 crate_name: "libfdt",
28 srcs: [
29 "src/lib.rs",
30 ":liblibfdt_bindgen",
31 ],
32 edition: "2021",
33 no_stdlibs: true,
34 prefer_rlib: true,
35 stdlibs: [
36 "libcore.rust_sysroot",
37 ],
38 rustlibs: [
39 "liblibfdt_bindgen",
Pierre-Clément Tosic27c4272023-05-19 15:46:26 +000040 "libzerocopy_nostd",
David Brazdil1baa9a92022-06-28 14:47:50 +010041 ],
42 whole_static_libs: [
43 "libfdt",
44 ],
45 apex_available: ["com.android.virt"],
46}