// This file is generated by cargo_embargo. // Do not modify this file after the first "rust_*" or "genrule" module // because the changes will be overridden on upgrade. // Content before the first "rust_*" or "genrule" module is preserved. 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_inner_defaults"], host_supported: false, // Can't seem to access syslog in TH host tests. crate_name: "base", cargo_env_compat: true, cargo_pkg_version: "0.1.0", crate_root: "src/lib.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { unit_test: true, }, edition: "2021", rustlibs: [ "libaudio_streams", "libcfg_if", "libchrono", "libenv_logger", "liblibc", "liblog_rust", "libonce_cell", "libserde", "libserde_json", "libsmallvec", "libsync_rust", "libtempfile", "libthiserror", "libuuid", "libzerocopy", ], proc_macros: [ "libbase_event_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/linux/capabilities.rs } rust_test { name: "base_test_tests_linux_main", defaults: ["crosvm_inner_defaults"], host_supported: false, // Can't seem to access syslog in TH host tests. crate_name: "linux", cargo_env_compat: true, cargo_pkg_version: "0.1.0", crate_root: "tests/linux/main.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { unit_test: true, }, edition: "2021", rustlibs: [ "libaudio_streams", "libbase_rust", "libcfg_if", "libchrono", "libenv_logger", "liblibc", "liblog_rust", "libonce_cell", "libserde", "libserde_json", "libsmallvec", "libsync_rust", "libtempfile", "libthiserror", "libuuid", "libzerocopy", ], proc_macros: [ "libbase_event_token_derive", "libremain", ], } rust_test { name: "base_test_tests_syslog", defaults: ["crosvm_inner_defaults"], host_supported: true, crate_name: "syslog", cargo_env_compat: true, cargo_pkg_version: "0.1.0", crate_root: "tests/syslog.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { unit_test: true, }, edition: "2021", rustlibs: [ "libaudio_streams", "libbase_rust", "libcfg_if", "libchrono", "libenv_logger", "liblibc", "liblog_rust", "libonce_cell", "libserde", "libserde_json", "libsmallvec", "libsync_rust", "libtempfile", "libthiserror", "libuuid", "libzerocopy", ], proc_macros: [ "libbase_event_token_derive", "libremain", ], } rust_test { name: "base_test_tests_tube", defaults: ["crosvm_inner_defaults"], host_supported: true, crate_name: "tube", cargo_env_compat: true, cargo_pkg_version: "0.1.0", crate_root: "tests/tube.rs", test_suites: ["general-tests"], auto_gen_config: true, test_options: { unit_test: true, }, edition: "2021", rustlibs: [ "libaudio_streams", "libbase_rust", "libcfg_if", "libchrono", "libenv_logger", "liblibc", "liblog_rust", "libonce_cell", "libserde", "libserde_json", "libsmallvec", "libsync_rust", "libtempfile", "libthiserror", "libuuid", "libzerocopy", ], proc_macros: [ "libbase_event_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/linux/capabilities.rs } rust_library { name: "libbase_rust", defaults: ["crosvm_inner_defaults"], host_supported: true, crate_name: "base", cargo_env_compat: true, cargo_pkg_version: "0.1.0", crate_root: "src/lib.rs", edition: "2021", rustlibs: [ "libaudio_streams", "libcfg_if", "libchrono", "libenv_logger", "liblibc", "liblog_rust", "libonce_cell", "libserde", "libserde_json", "libsmallvec", "libsync_rust", "libthiserror", "libuuid", "libzerocopy", ], proc_macros: [ "libbase_event_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/linux/capabilities.rs visibility: ["//vendor:__subpackages__"], }