blob: 4e620900b26930984b64cb86d0761ee1c8c5c380 [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 Brazdilb41aa8f2022-07-05 12:41:00 +010014 "liblog_rust_nostd",
Andrew Walbraneef98202022-04-27 16:23:06 +000015 "libvmbase",
16 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000017 apex_available: ["com.android.virt"],
18}
19
20cc_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010021 name: "vmbase_example",
David Brazdil30a7f082022-07-07 15:30:14 +010022 defaults: ["vmbase_elf_defaults"],
Andrew Walbraneef98202022-04-27 16:23:06 +000023 srcs: [
24 "idmap.S",
25 ],
26 static_libs: [
Andrew Walbraneef98202022-04-27 16:23:06 +000027 "libvmbase_example",
28 ],
Andrew Walbrana5b7af52022-07-06 15:06:20 +000029 linker_scripts: [
30 "image.ld",
31 ":vmbase_sections",
32 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000033 apex_available: ["com.android.virt"],
34}
35
36raw_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010037 name: "vmbase_example_bin",
38 stem: "vmbase_example.bin",
39 src: ":vmbase_example",
Andrew Walbraneef98202022-04-27 16:23:06 +000040 enabled: false,
41 target: {
42 android_arm64: {
43 enabled: true,
44 },
45 },
46}
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000047
48rust_test {
49 name: "vmbase_example.integration_test",
50 crate_name: "vmbase_example_test",
51 srcs: ["tests/test.rs"],
52 prefer_rlib: true,
53 edition: "2021",
54 rustlibs: [
55 "android.system.virtualizationservice-rust",
56 "libanyhow",
57 "libenv_logger",
58 "liblibc",
59 "liblog_rust",
60 "libvmclient",
61 ],
62 data: [
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010063 ":vmbase_example_bin",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000064 ],
65 test_suites: ["general-tests"],
66 enabled: false,
67 target: {
68 android_arm64: {
69 enabled: true,
70 },
71 },
72}