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