blob: ada66dde164b086a86b3269b0fda9021f67c3ad9 [file] [log] [blame]
David Brazdil3f0f1e82023-01-12 16:18:43 +00001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5rust_defaults {
6 name: "virtualizationmanager_defaults",
7 crate_name: "virtualizationmanager",
Shikha Panwar5d6a6752023-12-14 22:08:26 +00008 defaults: [
9 "avf_build_flags_rust",
10 "secretkeeper_use_latest_hal_aidl_rust",
11 "authgraph_use_latest_hal_aidl_rust",
12 ],
David Brazdil3f0f1e82023-01-12 16:18:43 +000013 edition: "2021",
14 // Only build on targets which crosvm builds on.
15 enabled: false,
16 target: {
17 android64: {
18 compile_multilib: "64",
19 enabled: true,
20 },
21 linux_bionic_arm64: {
22 enabled: true,
23 },
24 },
25 prefer_rlib: true,
26 rustlibs: [
27 "android.system.virtualizationcommon-rust",
28 "android.system.virtualizationservice-rust",
29 "android.system.virtualizationservice_internal-rust",
30 "android.system.virtualmachineservice-rust",
31 "android.os.permissions_aidl-rust",
32 "libandroid_logger",
33 "libanyhow",
34 "libapkverify",
Shikha Panwar6d306412024-02-17 21:37:49 +000035 "libavf_features",
Jiyong Parkd7bd2f22023-08-10 20:41:19 +090036 "libavflog",
David Brazdil3f0f1e82023-01-12 16:18:43 +000037 "libbase_rust",
38 "libbinder_rs",
David Daic97e82d2024-02-17 12:10:31 -080039 "libcfg_if",
David Brazdil3f0f1e82023-01-12 16:18:43 +000040 "libclap",
Jaewan Kim39952072024-01-19 17:04:53 +090041 "libcstr",
David Brazdil3f0f1e82023-01-12 16:18:43 +000042 "libcommand_fds",
43 "libdisk",
Inseob Kim46257382024-01-03 15:41:22 +090044 "libglob",
Seungjae Yoo14e60182024-02-21 13:28:31 +090045 "libhex",
Alan Stokesc4d5def2023-02-14 17:01:59 +000046 "libhypervisor_props",
David Brazdil3f0f1e82023-01-12 16:18:43 +000047 "liblazy_static",
48 "liblibc",
49 "liblog_rust",
50 "libmicrodroid_metadata",
51 "libmicrodroid_payload_config",
52 "libnested_virt",
53 "libnix",
54 "libonce_cell",
55 "libregex",
56 "librpcbinder_rs",
57 "librustutils",
58 "libsemver",
59 "libselinux_bindgen",
60 "libserde",
61 "libserde_json",
62 "libserde_xml_rs",
63 "libshared_child",
64 "libstatslog_virtualization_rust",
65 "libtombstoned_client_rust",
Seungjae Yoo14e60182024-02-21 13:28:31 +090066 "libvbmeta_rust",
David Brazdil3f0f1e82023-01-12 16:18:43 +000067 "libvm_control",
68 "libvmconfig",
69 "libzip",
70 "libvsock",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090071 "liblibfdt",
Jaewan Kim39952072024-01-19 17:04:53 +090072 "libfsfdt",
Nikita Ioffef934e812024-07-05 15:44:41 +000073 "libhypervisor_props",
David Brazdil3f0f1e82023-01-12 16:18:43 +000074 // TODO(b/202115393) stabilize the interface
75 "packagemanager_aidl-rust",
76 ],
77 shared_libs: [
David Brazdil3f0f1e82023-01-12 16:18:43 +000078 "libselinux",
79 ],
80}
81
82rust_binary {
83 name: "virtmgr",
84 defaults: ["virtualizationmanager_defaults"],
85 srcs: ["src/main.rs"],
86 apex_available: ["com.android.virt"],
87}
88
89rust_test {
90 name: "virtualizationmanager_device_test",
91 srcs: ["src/main.rs"],
92 defaults: ["virtualizationmanager_defaults"],
93 rustlibs: [
94 "libtempfile",
95 ],
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090096 data: [
Jaewan Kim46b96702023-09-07 15:24:51 +090097 ":test_avf_debug_policy_with_ramdump",
98 ":test_avf_debug_policy_without_ramdump",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090099 ":test_avf_debug_policy_with_adb",
100 ":test_avf_debug_policy_without_adb",
101 ],
David Brazdil3f0f1e82023-01-12 16:18:43 +0000102 test_suites: ["general-tests"],
103}
Inseob Kim15601812024-05-27 17:32:47 +0900104
105cc_fuzz {
106 name: "virtualizationmanager_fuzzer",
107 defaults: ["service_fuzzer_defaults"],
108 srcs: ["fuzzer.cpp"],
109 static_libs: [
110 "android.system.virtualizationservice-ndk",
111 "libbase",
112 ],
113 shared_libs: [
114 "libbinder_ndk",
115 "libbinder_rpc_unstable",
116 "liblog",
117 ],
118 fuzz_config: {
119 cc: ["android-kvm@google.com"],
120 },
121}