blob: e0a87db4f29107753106412e2361f62fabc34d68 [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 ],
David Brazdil1baa9a92022-06-28 14:47:50 +010020 static_libs: [
21 "libarm-optimized-routines-mem",
22 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000023 apex_available: ["com.android.virt"],
24}
25
26cc_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010027 name: "vmbase_example",
David Brazdil30a7f082022-07-07 15:30:14 +010028 defaults: ["vmbase_elf_defaults"],
Andrew Walbraneef98202022-04-27 16:23:06 +000029 srcs: [
30 "idmap.S",
31 ],
32 static_libs: [
Andrew Walbraneef98202022-04-27 16:23:06 +000033 "libvmbase_example",
34 ],
Andrew Walbrana5b7af52022-07-06 15:06:20 +000035 linker_scripts: [
36 "image.ld",
37 ":vmbase_sections",
38 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000039 apex_available: ["com.android.virt"],
40}
41
42raw_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010043 name: "vmbase_example_bin",
44 stem: "vmbase_example.bin",
45 src: ":vmbase_example",
Andrew Walbraneef98202022-04-27 16:23:06 +000046 enabled: false,
47 target: {
48 android_arm64: {
49 enabled: true,
50 },
51 },
52}
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000053
54rust_test {
55 name: "vmbase_example.integration_test",
56 crate_name: "vmbase_example_test",
57 srcs: ["tests/test.rs"],
58 prefer_rlib: true,
59 edition: "2021",
60 rustlibs: [
61 "android.system.virtualizationservice-rust",
Pierre-Clément Tosi0d1aed02022-11-17 17:06:28 +000062 "libandroid_logger",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000063 "libanyhow",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000064 "liblibc",
65 "liblog_rust",
Pierre-Clément Tosi0d1aed02022-11-17 17:06:28 +000066 "libnix",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000067 "libvmclient",
68 ],
69 data: [
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010070 ":vmbase_example_bin",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000071 ],
72 test_suites: ["general-tests"],
73 enabled: false,
74 target: {
75 android_arm64: {
76 enabled: true,
77 },
78 },
79}