| package { |
| default_applicable_licenses: ["Android-Apache-2.0"], |
| } |
| |
| rust_defaults { |
| name: "virtualizationmanager_defaults", |
| crate_name: "virtualizationmanager", |
| defaults: [ |
| "avf_build_flags_rust", |
| "secretkeeper_use_latest_hal_aidl_rust", |
| "authgraph_use_latest_hal_aidl_rust", |
| ], |
| edition: "2021", |
| // Only build on targets which crosvm builds on. |
| enabled: false, |
| target: { |
| android64: { |
| compile_multilib: "64", |
| enabled: true, |
| }, |
| linux_bionic_arm64: { |
| enabled: true, |
| }, |
| }, |
| prefer_rlib: true, |
| rustlibs: [ |
| "android.system.virtualizationcommon-rust", |
| "android.system.virtualizationservice-rust", |
| "android.system.virtualizationservice_internal-rust", |
| "android.system.virtualmachineservice-rust", |
| "android.os.permissions_aidl-rust", |
| "libandroid_logger", |
| "libanyhow", |
| "libapkverify", |
| "libavf_features", |
| "libavflog", |
| "libbinder_rs", |
| "libcfg_if", |
| "libclap", |
| "libcrosvm_control_static", |
| "libcommand_fds", |
| "libdisk", |
| "libglob", |
| "libhex", |
| "libhypervisor_props", |
| "liblibc", |
| "liblog_rust", |
| "libmicrodroid_metadata", |
| "libmicrodroid_payload_config", |
| "libnested_virt", |
| "libnix", |
| "libonce_cell", |
| "libregex", |
| "librpcbinder_rs", |
| "librustutils", |
| "libsemver", |
| "libselinux_bindgen", |
| "libserde", |
| "libserde_json", |
| "libserde_xml_rs", |
| "libshared_child", |
| "libstatslog_virtualization_rust", |
| "libtombstoned_client_rust", |
| "libvbmeta_rust", |
| "libvmconfig", |
| "libzip", |
| "libvsock", |
| "liblibfdt", |
| "libfsfdt", |
| "libhypervisor_props", |
| "libzerocopy", |
| "libuuid", |
| // TODO(b/202115393) stabilize the interface |
| "packagemanager_aidl-rust", |
| ], |
| shared_libs: [ |
| "libselinux", |
| ], |
| } |
| |
| rust_binary { |
| name: "virtmgr", |
| defaults: ["virtualizationmanager_defaults"], |
| srcs: ["src/main.rs"], |
| apex_available: ["com.android.virt"], |
| } |
| |
| rust_binary { |
| name: "early_virtmgr", |
| defaults: ["virtualizationmanager_defaults"], |
| srcs: ["src/main.rs"], |
| cfgs: ["early"], |
| apex_available: ["com.android.virt"], |
| } |
| |
| xsd_config { |
| name: "early_vms", |
| srcs: ["early_vms.xsd"], |
| api_dir: "schema", |
| package_name: "android.system.virtualizationservice", |
| } |
| |
| rust_test { |
| name: "virtualizationmanager_device_test", |
| srcs: ["src/main.rs"], |
| defaults: ["virtualizationmanager_defaults"], |
| rustlibs: [ |
| "libtempfile", |
| ], |
| data: [ |
| ":test_avf_debug_policy_with_ramdump", |
| ":test_avf_debug_policy_without_ramdump", |
| ":test_avf_debug_policy_with_adb", |
| ":test_avf_debug_policy_without_adb", |
| ], |
| test_suites: ["general-tests"], |
| } |
| |
| cc_fuzz { |
| name: "virtualizationmanager_fuzzer", |
| defaults: ["service_fuzzer_defaults"], |
| srcs: ["fuzzer.cpp"], |
| static_libs: [ |
| "android.system.virtualizationservice-ndk", |
| "libbase", |
| ], |
| shared_libs: [ |
| "libbinder_ndk", |
| "libbinder_rpc_unstable", |
| "liblog", |
| ], |
| fuzz_config: { |
| cc: ["android-kvm@google.com"], |
| }, |
| } |