Alan Stokes | 16fb855 | 2022-02-10 15:07:27 +0000 | [diff] [blame] | 1 | package { |
Aditya Choudhary | 5369617 | 2024-02-05 15:46:19 +0000 | [diff] [blame] | 2 | default_team: "trendy_team_virtualization", |
Alan Stokes | 16fb855 | 2022-02-10 15:07:27 +0000 | [diff] [blame] | 3 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 4 | } |
| 5 | |
| 6 | rust_library { |
| 7 | name: "libcompos_verify_native_rust", |
| 8 | crate_name: "compos_verify_native", |
Nikita Ioffe | da1b273 | 2023-09-04 13:46:56 +0100 | [diff] [blame] | 9 | defaults: ["avf_build_flags_rust"], |
Alan Stokes | 16fb855 | 2022-02-10 15:07:27 +0000 | [diff] [blame] | 10 | srcs: ["lib.rs"], |
| 11 | rustlibs: [ |
| 12 | "libanyhow", |
| 13 | "libcxx", |
| 14 | "liblibc", |
| 15 | ], |
| 16 | static_libs: [ |
| 17 | "libcompos_verify_native_cpp", |
| 18 | "libcompos_key", |
| 19 | ], |
| 20 | shared_libs: [ |
| 21 | "libcrypto", |
| 22 | ], |
| 23 | apex_available: ["com.android.compos"], |
| 24 | } |
| 25 | |
| 26 | cc_library_static { |
| 27 | name: "libcompos_verify_native_cpp", |
| 28 | srcs: ["verify_native.cpp"], |
| 29 | static_libs: ["libcompos_key"], |
| 30 | shared_libs: [ |
| 31 | "libbase", |
| 32 | "libcrypto", |
| 33 | ], |
| 34 | generated_headers: ["compos_verify_native_header"], |
| 35 | generated_sources: ["compos_verify_native_code"], |
| 36 | apex_available: ["com.android.compos"], |
| 37 | } |
| 38 | |
| 39 | genrule { |
| 40 | name: "compos_verify_native_code", |
| 41 | tools: ["cxxbridge"], |
| 42 | cmd: "$(location cxxbridge) $(in) >> $(out)", |
| 43 | srcs: ["lib.rs"], |
| 44 | out: ["verify_native_cxx_generated.cc"], |
| 45 | } |
| 46 | |
| 47 | genrule { |
| 48 | name: "compos_verify_native_header", |
| 49 | tools: ["cxxbridge"], |
| 50 | cmd: "$(location cxxbridge) $(in) --header >> $(out)", |
| 51 | srcs: ["lib.rs"], |
| 52 | out: ["lib.rs.h"], |
| 53 | } |