blob: dd2a937cea9074309c01adb99b45e36a37c79a7f [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",
David Brazdil451cc962022-10-14 14:08:12 +010017 "liblibc",
Alice Wangfb46ee12022-09-30 13:08:52 +000018 "liblog_rust",
Alice Wang2be64f32022-10-13 14:37:35 +000019 "librpcbinder_rs",
Alice Wangfb46ee12022-09-30 13:08:52 +000020 ],
Andrew Sculle4b02852022-10-06 18:53:56 +000021 apex_available: [
22 "com.android.compos",
23 ],
Alice Wang5ef60e62022-11-03 08:19:02 +000024 // The sanitize section below fixes the fuzzer build in b/256166339.
25 // TODO(b/250854486): Remove the sanitize section once the bug is fixed.
Alice Wang8d7e1072022-11-02 17:42:52 +000026 sanitize: {
27 address: false,
28 },
Alice Wangfb46ee12022-09-30 13:08:52 +000029}
Alice Wangbd569a02022-10-06 15:23:24 +000030
31rust_bindgen {
32 name: "libvm_payload_bindgen",
Alan Stokesd4ea5a82022-11-10 12:17:42 +000033 wrapper_src: "include-restricted/vm_payload_restricted.h",
Alice Wangbd569a02022-10-06 15:23:24 +000034 crate_name: "vm_payload_bindgen",
35 source_stem: "bindings",
36 apex_available: ["com.android.compos"],
37 visibility: ["//packages/modules/Virtualization/compos"],
38 shared_libs: [
39 "libvm_payload",
40 ],
41}
Alan Stokes52d3c722022-10-04 17:27:13 +010042
43cc_library_headers {
44 name: "vm_payload_headers",
Alan Stokesd4ea5a82022-11-10 12:17:42 +000045 apex_available: ["com.android.compos"],
Alan Stokes52d3c722022-10-04 17:27:13 +010046 export_include_dirs: ["include"],
47}
Alan Stokesd4ea5a82022-11-10 12:17:42 +000048
49cc_library_headers {
50 name: "vm_payload_restricted_headers",
51 header_libs: ["vm_payload_headers"],
52 export_header_lib_headers: ["vm_payload_headers"],
53 export_include_dirs: ["include-restricted"],
54 apex_available: ["com.android.compos"],
55 visibility: ["//packages/modules/Virtualization:__subpackages__"],
56}