David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
| 5 | rust_defaults { |
| 6 | name: "virtualizationmanager_defaults", |
| 7 | crate_name: "virtualizationmanager", |
Shikha Panwar | 5d6a675 | 2023-12-14 22:08:26 +0000 | [diff] [blame] | 8 | defaults: [ |
| 9 | "avf_build_flags_rust", |
| 10 | "secretkeeper_use_latest_hal_aidl_rust", |
| 11 | "authgraph_use_latest_hal_aidl_rust", |
| 12 | ], |
David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 13 | 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 Panwar | 6d30641 | 2024-02-17 21:37:49 +0000 | [diff] [blame] | 35 | "libavf_features", |
Jiyong Park | d7bd2f2 | 2023-08-10 20:41:19 +0900 | [diff] [blame] | 36 | "libavflog", |
David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 37 | "libbase_rust", |
| 38 | "libbinder_rs", |
David Dai | c97e82d | 2024-02-17 12:10:31 -0800 | [diff] [blame] | 39 | "libcfg_if", |
David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 40 | "libclap", |
Jaewan Kim | 3995207 | 2024-01-19 17:04:53 +0900 | [diff] [blame] | 41 | "libcstr", |
David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 42 | "libcommand_fds", |
| 43 | "libdisk", |
Inseob Kim | 4625738 | 2024-01-03 15:41:22 +0900 | [diff] [blame] | 44 | "libglob", |
Seungjae Yoo | 14e6018 | 2024-02-21 13:28:31 +0900 | [diff] [blame] | 45 | "libhex", |
Alan Stokes | c4d5def | 2023-02-14 17:01:59 +0000 | [diff] [blame] | 46 | "libhypervisor_props", |
David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 47 | "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 Yoo | 14e6018 | 2024-02-21 13:28:31 +0900 | [diff] [blame] | 66 | "libvbmeta_rust", |
David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 67 | "libvm_control", |
| 68 | "libvmconfig", |
| 69 | "libzip", |
| 70 | "libvsock", |
Jaewan Kim | 4cf20aa | 2023-04-03 10:25:38 +0900 | [diff] [blame] | 71 | "liblibfdt", |
Jaewan Kim | 3995207 | 2024-01-19 17:04:53 +0900 | [diff] [blame] | 72 | "libfsfdt", |
Nikita Ioffe | f934e81 | 2024-07-05 15:44:41 +0000 | [diff] [blame] | 73 | "libhypervisor_props", |
David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 74 | // TODO(b/202115393) stabilize the interface |
| 75 | "packagemanager_aidl-rust", |
| 76 | ], |
| 77 | shared_libs: [ |
David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 78 | "libselinux", |
| 79 | ], |
| 80 | } |
| 81 | |
| 82 | rust_binary { |
| 83 | name: "virtmgr", |
| 84 | defaults: ["virtualizationmanager_defaults"], |
| 85 | srcs: ["src/main.rs"], |
| 86 | apex_available: ["com.android.virt"], |
| 87 | } |
| 88 | |
| 89 | rust_test { |
| 90 | name: "virtualizationmanager_device_test", |
| 91 | srcs: ["src/main.rs"], |
| 92 | defaults: ["virtualizationmanager_defaults"], |
| 93 | rustlibs: [ |
| 94 | "libtempfile", |
| 95 | ], |
Jaewan Kim | 4cf20aa | 2023-04-03 10:25:38 +0900 | [diff] [blame] | 96 | data: [ |
Jaewan Kim | 46b9670 | 2023-09-07 15:24:51 +0900 | [diff] [blame] | 97 | ":test_avf_debug_policy_with_ramdump", |
| 98 | ":test_avf_debug_policy_without_ramdump", |
Jaewan Kim | 4cf20aa | 2023-04-03 10:25:38 +0900 | [diff] [blame] | 99 | ":test_avf_debug_policy_with_adb", |
| 100 | ":test_avf_debug_policy_without_adb", |
| 101 | ], |
David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 102 | test_suites: ["general-tests"], |
| 103 | } |
Inseob Kim | 1560181 | 2024-05-27 17:32:47 +0900 | [diff] [blame] | 104 | |
| 105 | cc_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 | } |