David Brazdil | 1baa9a9 | 2022-06-28 14:47:50 +0100 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
| 5 | rust_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 | |
| 25 | rust_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 Tosi | c27c427 | 2023-05-19 15:46:26 +0000 | [diff] [blame] | 40 | "libzerocopy_nostd", |
David Brazdil | 1baa9a9 | 2022-06-28 14:47:50 +0100 | [diff] [blame] | 41 | ], |
| 42 | whole_static_libs: [ |
| 43 | "libfdt", |
| 44 | ], |
| 45 | apex_available: ["com.android.virt"], |
| 46 | } |