blob: e9a3f9848d30b471227c9585a0cf93747f6beefc [file] [log] [blame]
Andrew Walbraneef98202022-04-27 16:23:06 +00001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5rust_ffi_static {
6 name: "libvmbase_example",
David Brazdil30a7f082022-07-07 15:30:14 +01007 defaults: ["vmbase_ffi_defaults"],
Andrew Walbraneef98202022-04-27 16:23:06 +00008 crate_name: "vmbase_example",
9 srcs: ["src/main.rs"],
10 edition: "2021",
Andrew Walbraneef98202022-04-27 16:23:06 +000011 rustlibs: [
Andrew Walbran13564542022-04-20 16:29:45 +000012 "libaarch64_paging",
Andrew Walbranf7b6dc82022-04-20 16:24:30 +000013 "libbuddy_system_allocator",
David Brazdil9a83e612022-09-27 17:38:10 +000014 "libdice_nostd",
David Brazdilb41aa8f2022-07-05 12:41:00 +010015 "liblog_rust_nostd",
Andrew Walbraneef98202022-04-27 16:23:06 +000016 "libvmbase",
17 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000018 apex_available: ["com.android.virt"],
19}
20
21cc_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010022 name: "vmbase_example",
David Brazdil30a7f082022-07-07 15:30:14 +010023 defaults: ["vmbase_elf_defaults"],
Andrew Walbraneef98202022-04-27 16:23:06 +000024 srcs: [
25 "idmap.S",
26 ],
27 static_libs: [
Andrew Walbraneef98202022-04-27 16:23:06 +000028 "libvmbase_example",
29 ],
Andrew Walbrana5b7af52022-07-06 15:06:20 +000030 linker_scripts: [
31 "image.ld",
32 ":vmbase_sections",
33 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000034 apex_available: ["com.android.virt"],
35}
36
37raw_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010038 name: "vmbase_example_bin",
39 stem: "vmbase_example.bin",
40 src: ":vmbase_example",
Andrew Walbraneef98202022-04-27 16:23:06 +000041 enabled: false,
42 target: {
43 android_arm64: {
44 enabled: true,
45 },
46 },
47}
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000048
49rust_test {
50 name: "vmbase_example.integration_test",
51 crate_name: "vmbase_example_test",
52 srcs: ["tests/test.rs"],
53 prefer_rlib: true,
54 edition: "2021",
55 rustlibs: [
56 "android.system.virtualizationservice-rust",
57 "libanyhow",
58 "libenv_logger",
59 "liblibc",
60 "liblog_rust",
61 "libvmclient",
62 ],
63 data: [
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010064 ":vmbase_example_bin",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000065 ],
66 test_suites: ["general-tests"],
67 enabled: false,
68 target: {
69 android_arm64: {
70 enabled: true,
71 },
72 },
73}