blob: 438d93a256ca1c49b4a2fb39e5a8f5f5e3fbf17b [file] [log] [blame]
Alan Stokes16fb8552022-02-10 15:07:27 +00001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5rust_library {
6 name: "libcompos_verify_native_rust",
7 crate_name: "compos_verify_native",
Nikita Ioffeda1b2732023-09-04 13:46:56 +01008 defaults: ["avf_build_flags_rust"],
Alan Stokes16fb8552022-02-10 15:07:27 +00009 srcs: ["lib.rs"],
10 rustlibs: [
11 "libanyhow",
12 "libcxx",
13 "liblibc",
14 ],
15 static_libs: [
16 "libcompos_verify_native_cpp",
17 "libcompos_key",
18 ],
19 shared_libs: [
20 "libcrypto",
21 ],
22 apex_available: ["com.android.compos"],
23}
24
25cc_library_static {
26 name: "libcompos_verify_native_cpp",
27 srcs: ["verify_native.cpp"],
28 static_libs: ["libcompos_key"],
29 shared_libs: [
30 "libbase",
31 "libcrypto",
32 ],
33 generated_headers: ["compos_verify_native_header"],
34 generated_sources: ["compos_verify_native_code"],
35 apex_available: ["com.android.compos"],
36}
37
38genrule {
39 name: "compos_verify_native_code",
40 tools: ["cxxbridge"],
41 cmd: "$(location cxxbridge) $(in) >> $(out)",
42 srcs: ["lib.rs"],
43 out: ["verify_native_cxx_generated.cc"],
44}
45
46genrule {
47 name: "compos_verify_native_header",
48 tools: ["cxxbridge"],
49 cmd: "$(location cxxbridge) $(in) --header >> $(out)",
50 srcs: ["lib.rs"],
51 out: ["lib.rs.h"],
52}