blob: e153f92da8e4d3d2794172f32b3c05b0904ddea0 [file] [log] [blame]
Alice Wangfb46ee12022-09-30 13:08:52 +00001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
Alice Wang609299c2022-10-07 11:39:50 +00005rust_ffi_shared {
Alice Wangfb46ee12022-09-30 13:08:52 +00006 name: "libvm_payload",
7 crate_name: "vm_payload",
8 srcs: ["src/*.rs"],
9 include_dirs: ["include"],
10 prefer_rlib: true,
11 rustlibs: [
Alice Wang59a9e562022-10-04 15:24:10 +000012 "android.system.virtualization.payload-rust",
Alice Wangfb46ee12022-09-30 13:08:52 +000013 "libandroid_logger",
14 "libanyhow",
15 "libbinder_rs",
Alice Wang6bbb6da2022-10-26 12:44:06 +000016 "liblazy_static",
Alice Wangfb46ee12022-09-30 13:08:52 +000017 "liblog_rust",
Alice Wang2be64f32022-10-13 14:37:35 +000018 "librpcbinder_rs",
Alice Wangfb46ee12022-09-30 13:08:52 +000019 ],
Andrew Sculle4b02852022-10-06 18:53:56 +000020 apex_available: [
21 "com.android.compos",
22 ],
Alice Wang5ef60e62022-11-03 08:19:02 +000023 // The sanitize section below fixes the fuzzer build in b/256166339.
24 // TODO(b/250854486): Remove the sanitize section once the bug is fixed.
Alice Wang8d7e1072022-11-02 17:42:52 +000025 sanitize: {
26 address: false,
27 },
Alice Wangfb46ee12022-09-30 13:08:52 +000028}
Alice Wangbd569a02022-10-06 15:23:24 +000029
30rust_bindgen {
31 name: "libvm_payload_bindgen",
Alan Stokesd4ea5a82022-11-10 12:17:42 +000032 wrapper_src: "include-restricted/vm_payload_restricted.h",
Alice Wangbd569a02022-10-06 15:23:24 +000033 crate_name: "vm_payload_bindgen",
34 source_stem: "bindings",
35 apex_available: ["com.android.compos"],
36 visibility: ["//packages/modules/Virtualization/compos"],
37 shared_libs: [
38 "libvm_payload",
39 ],
40}
Alan Stokes52d3c722022-10-04 17:27:13 +010041
42cc_library_headers {
43 name: "vm_payload_headers",
Alan Stokesd4ea5a82022-11-10 12:17:42 +000044 apex_available: ["com.android.compos"],
Alan Stokes52d3c722022-10-04 17:27:13 +010045 export_include_dirs: ["include"],
46}
Alan Stokesd4ea5a82022-11-10 12:17:42 +000047
48cc_library_headers {
49 name: "vm_payload_restricted_headers",
50 header_libs: ["vm_payload_headers"],
51 export_header_lib_headers: ["vm_payload_headers"],
52 export_include_dirs: ["include-restricted"],
53 apex_available: ["com.android.compos"],
54 visibility: ["//packages/modules/Virtualization:__subpackages__"],
55}