blob: d1ef4de399441d1ebc7b906943a2bd9f3b391103 [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",
David Brazdil3f0f1e82023-01-12 16:18:43 +000073 // TODO(b/202115393) stabilize the interface
74 "packagemanager_aidl-rust",
75 ],
76 shared_libs: [
David Brazdil3f0f1e82023-01-12 16:18:43 +000077 "libselinux",
78 ],
79}
80
81rust_binary {
82 name: "virtmgr",
83 defaults: ["virtualizationmanager_defaults"],
84 srcs: ["src/main.rs"],
85 apex_available: ["com.android.virt"],
86}
87
88rust_test {
89 name: "virtualizationmanager_device_test",
90 srcs: ["src/main.rs"],
91 defaults: ["virtualizationmanager_defaults"],
92 rustlibs: [
93 "libtempfile",
94 ],
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090095 data: [
Jaewan Kim46b96702023-09-07 15:24:51 +090096 ":test_avf_debug_policy_with_ramdump",
97 ":test_avf_debug_policy_without_ramdump",
Jaewan Kim4cf20aa2023-04-03 10:25:38 +090098 ":test_avf_debug_policy_with_adb",
99 ":test_avf_debug_policy_without_adb",
100 ],
David Brazdil3f0f1e82023-01-12 16:18:43 +0000101 test_suites: ["general-tests"],
102}
Inseob Kim15601812024-05-27 17:32:47 +0900103
104cc_fuzz {
105 name: "virtualizationmanager_fuzzer",
106 defaults: ["service_fuzzer_defaults"],
107 srcs: ["fuzzer.cpp"],
108 static_libs: [
109 "android.system.virtualizationservice-ndk",
110 "libbase",
111 ],
112 shared_libs: [
113 "libbinder_ndk",
114 "libbinder_rpc_unstable",
115 "liblog",
116 ],
117 fuzz_config: {
118 cc: ["android-kvm@google.com"],
119 },
120}