blob: fbad8f4f207d3964405fd364787d933f3c56d3af [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 Brazdil1baa9a92022-06-28 14:47:50 +010015 "liblibfdt",
David Brazdilb41aa8f2022-07-05 12:41:00 +010016 "liblog_rust_nostd",
Andrew Walbran8217d062022-11-22 16:56:18 +000017 "libvirtio_drivers",
Andrew Walbraneef98202022-04-27 16:23:06 +000018 "libvmbase",
19 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000020 apex_available: ["com.android.virt"],
21}
22
23cc_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010024 name: "vmbase_example",
David Brazdil30a7f082022-07-07 15:30:14 +010025 defaults: ["vmbase_elf_defaults"],
Andrew Walbraneef98202022-04-27 16:23:06 +000026 srcs: [
27 "idmap.S",
28 ],
29 static_libs: [
Andrew Walbraneef98202022-04-27 16:23:06 +000030 "libvmbase_example",
31 ],
Andrew Walbrana5b7af52022-07-06 15:06:20 +000032 linker_scripts: [
33 "image.ld",
34 ":vmbase_sections",
35 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000036 apex_available: ["com.android.virt"],
37}
38
39raw_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010040 name: "vmbase_example_bin",
41 stem: "vmbase_example.bin",
42 src: ":vmbase_example",
Andrew Walbraneef98202022-04-27 16:23:06 +000043 enabled: false,
44 target: {
45 android_arm64: {
46 enabled: true,
47 },
48 },
49}
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000050
51rust_test {
52 name: "vmbase_example.integration_test",
53 crate_name: "vmbase_example_test",
54 srcs: ["tests/test.rs"],
55 prefer_rlib: true,
56 edition: "2021",
57 rustlibs: [
58 "android.system.virtualizationservice-rust",
Pierre-Clément Tosi0d1aed02022-11-17 17:06:28 +000059 "libandroid_logger",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000060 "libanyhow",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000061 "liblibc",
62 "liblog_rust",
Pierre-Clément Tosi0d1aed02022-11-17 17:06:28 +000063 "libnix",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000064 "libvmclient",
65 ],
66 data: [
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010067 ":vmbase_example_bin",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000068 ],
69 test_suites: ["general-tests"],
70 enabled: false,
71 target: {
72 android_arm64: {
73 enabled: true,
74 },
75 },
76}