You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

453 lines
11 KiB

// This file is generated by cargo2android.py --run --device --tests --dependencies --no-subdir.
// Most modules in this file are edited manually:
// * global defaults defined in crosvm_defaults, enabled for linux_glibc_x86_64
// * all modules use crosvm_defaults or other defaults derived from it
// * root host binary is crosvm
// * crosvm and libcrosvm have extra features:
// * audio, gfxstream, gpu, virgl_renderer, virgl_renderer_next
// * crosvm has extra flags and ld_flags
// * crosvm_host_test_tests_boot and crosvm_host_test_tests_plugins
// are not ready yet
// We use cargo2android.py only to discover new changes.
// * Use --no-subdir to suppress output of subdirectory Android.bp files.
// * Run cargo2android.py in each subdirectory to generate .bp files.
package {
default_applicable_licenses: ["external_crosvm_license"],
}
// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
name: "external_crosvm_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-MIT",
],
license_text: [
"LICENSE",
],
}
rust_defaults {
name: "crosvm_defaults",
edition: "2018",
enabled: false,
target: {
linux_glibc_x86_64: {
enabled: true,
flags: [
"-L device/google/cuttlefish_vmm/x86_64-linux-gnu/bin/",
],
},
android64: {
compile_multilib: "64",
enabled: true,
},
linux_bionic_arm64: {
enabled: true,
},
darwin: {
enabled: false,
},
},
apex_available: [
"//apex_available:platform",
"com.android.virt",
],
}
rust_defaults {
name: "crosvm_proc_macro_defaults",
defaults: ["crosvm_defaults"],
target: {
darwin: {
enabled: true,
},
},
}
rust_binary {
name: "crosvm",
defaults: ["crosvm_defaults"],
host_supported: true,
prefer_rlib: true,
crate_name: "crosvm",
srcs: ["src/main.rs"],
target: {
linux_bionic_arm64: {
relative_install_path: "aarch64-linux-bionic",
},
linux_glibc_x86_64: {
features: [
"gdb",
"gdbstub",
],
relative_install_path: "x86_64-linux-gnu",
rustlibs: [
"libgdbstub",
"libthiserror",
],
},
darwin: {
enabled: false,
},
},
arch: {
x86_64: {
rustlibs: ["libx86_64_rust"],
},
arm64: {
rustlibs: ["libaarch64"],
},
},
edition: "2018",
features: [
"audio",
"default",
"gpu",
"gfxstream",
],
flags: [
"-C overflow-checks=y",
],
ld_flags: [
"-Wl,--rpath,\\$$ORIGIN",
"-Wl,--rpath,\\$$ORIGIN/../../lib64",
],
rustlibs: [
"libacpi_tables",
"libarch",
"libassertions",
"libaudio_streams",
"libbase_rust",
"libbit_field",
"libcrosvm",
"libdata_model",
"libdevices",
"libdisk",
"libhypervisor",
"libkernel_cmdline",
"libkernel_loader",
"liblibc",
"liblibcras",
"libminijail_rust",
"libnet_util",
"libp9",
"librand_ish",
"libresources",
"librutabaga_gfx",
"libsync_rust",
"libtempfile",
"libvhost",
"libvm_control",
"libvm_memory",
],
proc_macros: [
"libenumn",
"libremain",
],
}
rust_defaults {
name: "crosvm_defaults_test",
defaults: ["crosvm_defaults"],
crate_name: "crosvm",
srcs: ["src/crosvm.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
edition: "2018",
arch: {
x86_64: {
rustlibs: ["libx86_64_rust"],
},
arm64: {
rustlibs: ["libaarch64"],
},
},
target: {
linux_glibc_x86_64: {
features: [
"gdb",
"gdbstub",
],
rustlibs: [
"libgdbstub",
"libthiserror",
],
},
},
features: [
"default",
],
rustlibs: [
"libacpi_tables",
"libarch",
"libassertions",
"libbase_rust",
"libbit_field",
"libdata_model",
"libdevices",
"libdisk",
"libhypervisor",
"libkernel_cmdline",
"libkernel_loader",
"liblibc",
"libminijail_rust",
"libnet_util",
"libp9",
"librand_ish",
"libresources",
"librutabaga_gfx",
"libsync_rust",
"libtempfile",
"libvhost",
"libvm_control",
"libvm_memory",
],
proc_macros: [
"libenumn",
"libremain",
],
}
rust_test_host {
name: "crosvm_host_test_src_crosvm",
defaults: ["crosvm_defaults_test"],
features: [
"audio",
],
rustlibs: [
"libaudio_streams",
"liblibcras",
],
test_options: {
unit_test: true,
},
}
rust_test {
name: "crosvm_device_test_src_crosvm",
defaults: ["crosvm_defaults_test"],
features: [
"audio",
],
rustlibs: [
"libaudio_streams",
"liblibcras",
],
}
rust_defaults {
name: "crosvm_defaults_crosvm",
defaults: ["crosvm_defaults"],
crate_name: "crosvm",
srcs: ["src/main.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
edition: "2018",
arch: {
x86_64: {
rustlibs: ["libx86_64_rust"],
},
arm64: {
rustlibs: ["libaarch64"],
},
},
features: [
"default",
],
rustlibs: [
"libacpi_tables",
"libarch",
"libassertions",
"libbase_rust",
"libbit_field",
"libcrosvm",
"libdata_model",
"libdevices",
"libdisk",
"libhypervisor",
"libkernel_cmdline",
"libkernel_loader",
"liblibc",
"libminijail_rust",
"libnet_util",
"libp9",
"librand_ish",
"libresources",
"librutabaga_gfx",
"libsync_rust",
"libtempfile",
"libvhost",
"libvm_control",
"libvm_memory",
],
proc_macros: [
"libenumn",
"libremain",
],
}
rust_test_host {
name: "crosvm_host_test_src_main",
defaults: ["crosvm_defaults_crosvm"],
features: [
"audio",
],
rustlibs: [
"libaudio_streams",
"liblibcras",
],
test_options: {
unit_test: true,
},
}
rust_test {
name: "crosvm_device_test_src_main",
defaults: ["crosvm_defaults_crosvm"],
}
rust_library {
name: "libcrosvm",
defaults: ["crosvm_defaults"],
host_supported: true,
crate_name: "crosvm",
srcs: ["src/crosvm.rs"],
edition: "2018",
target: {
linux_glibc: {
features: [
"gfxstream",
],
},
linux_glibc_x86_64: {
features: [
"gdb",
"gdbstub",
],
rustlibs: [
"libgdbstub",
"libthiserror",
],
},
},
arch: {
x86_64: {
rustlibs: ["libx86_64_rust"],
},
arm64: {
rustlibs: ["libaarch64"],
},
},
features: [
"audio",
"default",
"gpu",
],
rustlibs: [
"libacpi_tables",
"libarch",
"libassertions",
"libaudio_streams",
"libbase_rust",
"libbit_field",
"libdata_model",
"libdevices",
"libdisk",
"libhypervisor",
"libkernel_cmdline",
"libkernel_loader",
"liblibc",
"liblibcras",
"libminijail_rust",
"libnet_util",
"libp9",
"librand_ish",
"libresources",
"librutabaga_gfx",
"libsync_rust",
"libtempfile",
"libvhost",
"libvm_control",
"libvm_memory",
],
proc_macros: [
"libenumn",
"libremain",
],
}
// dependent_library ["feature_list"]
// ../adhd/audio_streams/src/audio_streams.rs
// ../adhd/cras/client/cras-sys/src/lib.rs
// ../adhd/cras/client/libcras/src/libcras.rs
// ../libchromeos-rs/src/lib.rs
// ../minijail/rust/minijail-sys/lib.rs
// ../minijail/rust/minijail/src/lib.rs
// ../vm_tools/p9/src/lib.rs
// ../vm_tools/p9/wire_format_derive/wire_format_derive.rs
// async-task-4.0.3 "default,std"
// async-trait-0.1.45
// autocfg-1.0.1
// bitflags-1.2.1 "default"
// cc-1.0.25
// cfg-if-1.0.0
// downcast-rs-1.2.0 "default,std"
// futures-0.3.13 "alloc,async-await,default,executor,futures-executor,std"
// futures-channel-0.3.13 "alloc,futures-sink,sink,std"
// futures-core-0.3.13 "alloc,std"
// futures-executor-0.3.13 "std"
// futures-io-0.3.13 "std"
// futures-macro-0.3.13
// futures-sink-0.3.13 "alloc,std"
// futures-task-0.3.13 "alloc,std"
// futures-util-0.3.13 "alloc,async-await,async-await-macro,channel,futures-channel,futures-io,futures-macro,futures-sink,io,memchr,proc-macro-hack,proc-macro-nested,sink,slab,std"
// getrandom-0.2.2 "std"
// intrusive-collections-0.9.0 "alloc,default"
// libc-0.2.87 "default,std"
// log-0.4.14
// memchr-2.3.4 "default,std"
// memoffset-0.5.6 "default"
// paste-1.0.4
// pin-project-lite-0.2.6
// pin-utils-0.1.0
// pkg-config-0.3.19
// ppv-lite86-0.2.10 "simd,std"
// proc-macro-hack-0.5.19
// proc-macro-nested-0.1.7
// proc-macro2-1.0.24 "default,proc-macro"
// protobuf-2.22.0
// quote-1.0.9 "default,proc-macro"
// rand-0.8.3 "alloc,default,getrandom,libc,rand_chacha,rand_hc,std,std_rng"
// rand_chacha-0.3.0 "std"
// rand_core-0.6.2 "alloc,getrandom,std"
// remain-0.2.2
// remove_dir_all-0.5.3
// serde-1.0.123 "default,derive,serde_derive,std"
// serde_derive-1.0.123 "default"
// slab-0.4.2
// syn-1.0.61 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote,visit-mut"
// tempfile-3.2.0
// thiserror-1.0.24
// thiserror-impl-1.0.24
// unicode-xid-0.2.1 "default"