blob: dc9a0900634d165c1dbde04c9e1dab35b2d68361 [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",
Alice Wangcb9d2f92023-02-06 10:29:00 +000014 "libdiced_open_dice_nostd",
Andrew Walbran730375d2022-12-21 14:04:34 +000015 "libfdtpci",
David Brazdil1baa9a92022-06-28 14:47:50 +010016 "liblibfdt",
David Brazdilb41aa8f2022-07-05 12:41:00 +010017 "liblog_rust_nostd",
Andrew Walbran8217d062022-11-22 16:56:18 +000018 "libvirtio_drivers",
Andrew Walbraneef98202022-04-27 16:23:06 +000019 "libvmbase",
20 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000021}
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}
37
38raw_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010039 name: "vmbase_example_bin",
40 stem: "vmbase_example.bin",
41 src: ":vmbase_example",
Andrew Walbraneef98202022-04-27 16:23:06 +000042 enabled: false,
43 target: {
44 android_arm64: {
45 enabled: true,
46 },
47 },
48}
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000049
50rust_test {
51 name: "vmbase_example.integration_test",
52 crate_name: "vmbase_example_test",
53 srcs: ["tests/test.rs"],
54 prefer_rlib: true,
55 edition: "2021",
56 rustlibs: [
57 "android.system.virtualizationservice-rust",
Pierre-Clément Tosi0d1aed02022-11-17 17:06:28 +000058 "libandroid_logger",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000059 "libanyhow",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000060 "liblibc",
61 "liblog_rust",
Pierre-Clément Tosi0d1aed02022-11-17 17:06:28 +000062 "libnix",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000063 "libvmclient",
64 ],
65 data: [
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010066 ":vmbase_example_bin",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000067 ],
68 test_suites: ["general-tests"],
69 enabled: false,
70 target: {
71 android_arm64: {
72 enabled: true,
73 },
74 },
75}