android_packages_modules_Vi.../vmbase/example/Android.bp

76 lines
1.5 KiB
Plaintext

package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
rust_ffi_static {
name: "libvmbase_example",
defaults: ["vmbase_ffi_defaults"],
crate_name: "vmbase_example",
srcs: ["src/main.rs"],
edition: "2021",
rustlibs: [
"libaarch64_paging",
"libbuddy_system_allocator",
"libdiced_open_dice_nostd",
"libfdtpci",
"liblibfdt",
"liblog_rust_nostd",
"libvirtio_drivers",
"libvmbase",
],
}
cc_binary {
name: "vmbase_example",
defaults: ["vmbase_elf_defaults"],
srcs: [
"idmap.S",
],
static_libs: [
"libvmbase_example",
],
linker_scripts: [
"image.ld",
":vmbase_sections",
],
}
raw_binary {
name: "vmbase_example_bin",
stem: "vmbase_example.bin",
src: ":vmbase_example",
enabled: false,
target: {
android_arm64: {
enabled: true,
},
},
}
rust_test {
name: "vmbase_example.integration_test",
crate_name: "vmbase_example_test",
srcs: ["tests/test.rs"],
prefer_rlib: true,
edition: "2021",
rustlibs: [
"android.system.virtualizationservice-rust",
"libandroid_logger",
"libanyhow",
"liblibc",
"liblog_rust",
"libnix",
"libvmclient",
],
data: [
":vmbase_example_bin",
],
test_suites: ["general-tests"],
enabled: false,
target: {
android_arm64: {
enabled: true,
},
},
}