// This file is generated by cargo2android.py --config cargo2android.json. // Do not modify this file as changes will be overridden on upgrade. package { // See: http://go/android-license-faq // A large-scale-change added 'default_applicable_licenses' to import // all of the 'license_kinds' from "external_crosvm_license" // to get the below license kinds: // SPDX-license-identifier-BSD default_applicable_licenses: ["external_crosvm_license"], } rust_test { name: "base_test_src_lib", defaults: ["crosvm_defaults"], crate_name: "base", cargo_env_compat: true, cargo_pkg_version: "0.1.0", srcs: ["src/lib.rs"], test_suites: ["general-tests"], auto_gen_config: true, test_options: { unit_test: true, }, edition: "2021", rustlibs: [ "libaudio_streams", "libcfg_if", "libchrono", "libdata_model", "liblibc", "librand", "libregex", "libserde", "libserde_json", "libsmallvec", "libsync_rust", "libtempfile", "libthiserror", ], proc_macros: [ "libbase_poll_token_derive", "libremain", ], target: { android: { rustlibs: ["libandroid_log_sys"], }, linux_bionic_arm64: { // For ARM architecture, we use aarch64-linux-android for BOTH // device and host targets. As a result, host targets are also // built with target_os = "android". Therefore, sys_util/src/android // is used and thus this android module is required. // This seems incorrect, but is inevitable because rustc doesn't // yet support a Linux-based target using Bionic as libc. We can't // use aarch64-unknown-linux-gnu because it's using glibc which // we don't support for cross-host builds. rustlibs: [ "libandroid_log_sys", ], }, }, shared_libs: ["libcap"], // specified in src/unix/capabilities.rs } rust_library { name: "libbase_rust", defaults: ["crosvm_defaults"], stem: "libbase", host_supported: true, crate_name: "base", cargo_env_compat: true, cargo_pkg_version: "0.1.0", srcs: ["src/lib.rs"], edition: "2021", rustlibs: [ "libaudio_streams", "libcfg_if", "libchrono", "libdata_model", "liblibc", "librand", "libregex", "libserde", "libserde_json", "libsmallvec", "libsync_rust", "libtempfile", "libthiserror", ], proc_macros: [ "libbase_poll_token_derive", "libremain", ], target: { android: { rustlibs: ["libandroid_log_sys"], }, linux_bionic_arm64: { // For ARM architecture, we use aarch64-linux-android for BOTH // device and host targets. As a result, host targets are also // built with target_os = "android". Therefore, sys_util/src/android // is used and thus this android module is required. // This seems incorrect, but is inevitable because rustc doesn't // yet support a Linux-based target using Bionic as libc. We can't // use aarch64-unknown-linux-gnu because it's using glibc which // we don't support for cross-host builds. rustlibs: [ "libandroid_log_sys", ], }, }, shared_libs: ["libcap"], // specified in src/unix/capabilities.rs }