435 lines
9.6 KiB
Plaintext
435 lines
9.6 KiB
Plaintext
// This file is generated by cargo2android.py --config cargo2android.json.
|
|
// Do not modify this file as changes will be overridden on upgrade.
|
|
|
|
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_binary {
|
|
name: "crosvm",
|
|
defaults: ["crosvm_defaults"],
|
|
host_supported: true,
|
|
prefer_rlib: true,
|
|
crate_name: "crosvm",
|
|
srcs: ["src/main.rs"],
|
|
edition: "2018",
|
|
features: [
|
|
"audio",
|
|
"default",
|
|
"gfxstream",
|
|
"gpu",
|
|
"usb",
|
|
],
|
|
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",
|
|
"libresources",
|
|
"librutabaga_gfx",
|
|
"libserde_json",
|
|
"libsync_rust",
|
|
"libtempfile",
|
|
"libvhost",
|
|
"libvm_control",
|
|
"libvm_memory",
|
|
],
|
|
proc_macros: [
|
|
"libenumn",
|
|
"libremain",
|
|
],
|
|
arch: {
|
|
x86_64: {
|
|
rustlibs: ["libx86_64_rust"],
|
|
},
|
|
arm64: {
|
|
rustlibs: ["libaarch64"],
|
|
},
|
|
},
|
|
target: {
|
|
linux_bionic_arm64: {
|
|
relative_install_path: "aarch64-linux-bionic",
|
|
},
|
|
darwin: {
|
|
enabled: false,
|
|
},
|
|
linux_glibc_x86_64: {
|
|
relative_install_path: "x86_64-linux-gnu",
|
|
features: [
|
|
"gdb",
|
|
"gdbstub",
|
|
],
|
|
rustlibs: [
|
|
"libgdbstub",
|
|
"libgdbstub_arch",
|
|
"libthiserror",
|
|
],
|
|
},
|
|
},
|
|
ld_flags: [
|
|
"-Wl,--rpath,\\$$ORIGIN",
|
|
"-Wl,--rpath,\\$$ORIGIN/../../lib64",
|
|
],
|
|
}
|
|
|
|
rust_defaults {
|
|
name: "crosvm_test_defaults",
|
|
defaults: ["crosvm_defaults"],
|
|
crate_name: "crosvm",
|
|
srcs: ["src/crosvm.rs"],
|
|
test_suites: ["general-tests"],
|
|
auto_gen_config: true,
|
|
edition: "2018",
|
|
features: [
|
|
"audio",
|
|
"default",
|
|
"gfxstream",
|
|
"gpu",
|
|
"usb",
|
|
],
|
|
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",
|
|
"libresources",
|
|
"librutabaga_gfx",
|
|
"libserde_json",
|
|
"libsync_rust",
|
|
"libtempfile",
|
|
"libvhost",
|
|
"libvm_control",
|
|
"libvm_memory",
|
|
],
|
|
proc_macros: [
|
|
"libenumn",
|
|
"libremain",
|
|
],
|
|
}
|
|
|
|
rust_test_host {
|
|
name: "crosvm_host_test_src_crosvm",
|
|
defaults: ["crosvm_test_defaults"],
|
|
test_options: {
|
|
unit_test: true,
|
|
},
|
|
arch: {
|
|
x86_64: {
|
|
rustlibs: ["libx86_64_rust"],
|
|
},
|
|
arm64: {
|
|
rustlibs: ["libaarch64"],
|
|
},
|
|
},
|
|
target: {
|
|
linux_glibc_x86_64: {
|
|
features: [
|
|
"gdb",
|
|
"gdbstub",
|
|
],
|
|
rustlibs: [
|
|
"libgdbstub",
|
|
"libgdbstub_arch",
|
|
"libthiserror",
|
|
],
|
|
},
|
|
},
|
|
ld_flags: [
|
|
"-Wl,--rpath,\\$$ORIGIN",
|
|
"-Wl,--rpath,\\$$ORIGIN/../../lib64",
|
|
],
|
|
}
|
|
|
|
rust_test {
|
|
name: "crosvm_device_test_src_crosvm",
|
|
defaults: ["crosvm_test_defaults"],
|
|
arch: {
|
|
x86_64: {
|
|
rustlibs: ["libx86_64_rust"],
|
|
},
|
|
arm64: {
|
|
rustlibs: ["libaarch64"],
|
|
},
|
|
},
|
|
target: {
|
|
linux_glibc_x86_64: {
|
|
features: [
|
|
"gdb",
|
|
"gdbstub",
|
|
],
|
|
rustlibs: [
|
|
"libgdbstub",
|
|
"libgdbstub_arch",
|
|
"libthiserror",
|
|
],
|
|
},
|
|
},
|
|
ld_flags: [
|
|
"-Wl,--rpath,\\$$ORIGIN",
|
|
"-Wl,--rpath,\\$$ORIGIN/../../lib64",
|
|
],
|
|
}
|
|
|
|
rust_defaults {
|
|
name: "crosvm_test_defaults_crosvm",
|
|
defaults: ["crosvm_defaults"],
|
|
crate_name: "crosvm",
|
|
srcs: ["src/main.rs"],
|
|
test_suites: ["general-tests"],
|
|
auto_gen_config: true,
|
|
edition: "2018",
|
|
features: [
|
|
"audio",
|
|
"default",
|
|
"gfxstream",
|
|
"gpu",
|
|
"usb",
|
|
],
|
|
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",
|
|
"libresources",
|
|
"librutabaga_gfx",
|
|
"libserde_json",
|
|
"libsync_rust",
|
|
"libtempfile",
|
|
"libvhost",
|
|
"libvm_control",
|
|
"libvm_memory",
|
|
],
|
|
proc_macros: [
|
|
"libenumn",
|
|
"libremain",
|
|
],
|
|
}
|
|
|
|
rust_test_host {
|
|
name: "crosvm_host_test_src_main",
|
|
defaults: ["crosvm_test_defaults_crosvm"],
|
|
test_options: {
|
|
unit_test: true,
|
|
},
|
|
arch: {
|
|
x86_64: {
|
|
rustlibs: ["libx86_64_rust"],
|
|
},
|
|
arm64: {
|
|
rustlibs: ["libaarch64"],
|
|
},
|
|
},
|
|
target: {
|
|
linux_glibc_x86_64: {
|
|
features: [
|
|
"gdb",
|
|
"gdbstub",
|
|
],
|
|
rustlibs: [
|
|
"libgdbstub",
|
|
"libgdbstub_arch",
|
|
"libthiserror",
|
|
],
|
|
},
|
|
},
|
|
ld_flags: [
|
|
"-Wl,--rpath,\\$$ORIGIN",
|
|
"-Wl,--rpath,\\$$ORIGIN/../../lib64",
|
|
],
|
|
}
|
|
|
|
rust_test {
|
|
name: "crosvm_device_test_src_main",
|
|
defaults: ["crosvm_test_defaults_crosvm"],
|
|
arch: {
|
|
x86_64: {
|
|
rustlibs: ["libx86_64_rust"],
|
|
},
|
|
arm64: {
|
|
rustlibs: ["libaarch64"],
|
|
},
|
|
},
|
|
target: {
|
|
linux_glibc_x86_64: {
|
|
features: [
|
|
"gdb",
|
|
"gdbstub",
|
|
],
|
|
rustlibs: [
|
|
"libgdbstub",
|
|
"libgdbstub_arch",
|
|
"libthiserror",
|
|
],
|
|
},
|
|
},
|
|
ld_flags: [
|
|
"-Wl,--rpath,\\$$ORIGIN",
|
|
"-Wl,--rpath,\\$$ORIGIN/../../lib64",
|
|
],
|
|
}
|
|
|
|
rust_library {
|
|
name: "libcrosvm",
|
|
defaults: ["crosvm_defaults"],
|
|
host_supported: true,
|
|
crate_name: "crosvm",
|
|
srcs: ["src/crosvm.rs"],
|
|
edition: "2018",
|
|
features: [
|
|
"audio",
|
|
"default",
|
|
"gfxstream",
|
|
"gpu",
|
|
"usb",
|
|
],
|
|
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",
|
|
"libresources",
|
|
"librutabaga_gfx",
|
|
"libserde_json",
|
|
"libsync_rust",
|
|
"libtempfile",
|
|
"libvhost",
|
|
"libvm_control",
|
|
"libvm_memory",
|
|
],
|
|
proc_macros: [
|
|
"libenumn",
|
|
"libremain",
|
|
],
|
|
arch: {
|
|
x86_64: {
|
|
rustlibs: ["libx86_64_rust"],
|
|
},
|
|
arm64: {
|
|
rustlibs: ["libaarch64"],
|
|
},
|
|
},
|
|
target: {
|
|
linux_glibc_x86_64: {
|
|
features: [
|
|
"gdb",
|
|
"gdbstub",
|
|
],
|
|
rustlibs: [
|
|
"libgdbstub",
|
|
"libgdbstub_arch",
|
|
"libthiserror",
|
|
],
|
|
},
|
|
},
|
|
ld_flags: [
|
|
"-Wl,--rpath,\\$$ORIGIN",
|
|
"-Wl,--rpath,\\$$ORIGIN/../../lib64",
|
|
],
|
|
}
|
|
|
|
rust_defaults {
|
|
name: "crosvm_defaults",
|
|
edition: "2018",
|
|
enabled: false,
|
|
target: {
|
|
linux_glibc_x86_64: {
|
|
enabled: true,
|
|
},
|
|
android64: {
|
|
compile_multilib: "64",
|
|
enabled: true,
|
|
},
|
|
linux_bionic_arm64: {
|
|
enabled: true,
|
|
},
|
|
darwin: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
apex_available: [
|
|
"//apex_available:platform",
|
|
"com.android.virt",
|
|
],
|
|
}
|