blob: 6be6f220b2dd07a6cad905ec4b3f34db7a3988bf [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",
David Brazdil73988ea2022-11-11 15:10:32 +000020 "libvsock",
Alice Wangfb46ee12022-09-30 13:08:52 +000021 ],
Andrew Sculle4b02852022-10-06 18:53:56 +000022 apex_available: [
23 "com.android.compos",
24 ],
Alice Wang5ef60e62022-11-03 08:19:02 +000025 // The sanitize section below fixes the fuzzer build in b/256166339.
26 // TODO(b/250854486): Remove the sanitize section once the bug is fixed.
Alice Wang8d7e1072022-11-02 17:42:52 +000027 sanitize: {
28 address: false,
29 },
Alice Wangfb46ee12022-09-30 13:08:52 +000030}
Alice Wangbd569a02022-10-06 15:23:24 +000031
32rust_bindgen {
33 name: "libvm_payload_bindgen",
Alan Stokesd4ea5a82022-11-10 12:17:42 +000034 wrapper_src: "include-restricted/vm_payload_restricted.h",
Alice Wangbd569a02022-10-06 15:23:24 +000035 crate_name: "vm_payload_bindgen",
36 source_stem: "bindings",
37 apex_available: ["com.android.compos"],
38 visibility: ["//packages/modules/Virtualization/compos"],
39 shared_libs: [
40 "libvm_payload",
41 ],
42}
Alan Stokes52d3c722022-10-04 17:27:13 +010043
44cc_library_headers {
45 name: "vm_payload_headers",
Alan Stokesd4ea5a82022-11-10 12:17:42 +000046 apex_available: ["com.android.compos"],
Alan Stokes52d3c722022-10-04 17:27:13 +010047 export_include_dirs: ["include"],
48}
Alan Stokesd4ea5a82022-11-10 12:17:42 +000049
50cc_library_headers {
51 name: "vm_payload_restricted_headers",
52 header_libs: ["vm_payload_headers"],
53 export_header_lib_headers: ["vm_payload_headers"],
54 export_include_dirs: ["include-restricted"],
55 apex_available: ["com.android.compos"],
56 visibility: ["//packages/modules/Virtualization:__subpackages__"],
57}