blob: 505de6b7d8edfd485a08052704c380abe0528223 [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 Walbraneef98202022-04-27 16:23:06 +000017 "libvmbase",
18 ],
David Brazdil1baa9a92022-06-28 14:47:50 +010019 static_libs: [
20 "libarm-optimized-routines-mem",
21 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000022 apex_available: ["com.android.virt"],
23}
24
25cc_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010026 name: "vmbase_example",
David Brazdil30a7f082022-07-07 15:30:14 +010027 defaults: ["vmbase_elf_defaults"],
Andrew Walbraneef98202022-04-27 16:23:06 +000028 srcs: [
29 "idmap.S",
30 ],
31 static_libs: [
Andrew Walbraneef98202022-04-27 16:23:06 +000032 "libvmbase_example",
33 ],
Andrew Walbrana5b7af52022-07-06 15:06:20 +000034 linker_scripts: [
35 "image.ld",
36 ":vmbase_sections",
37 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000038 apex_available: ["com.android.virt"],
39}
40
41raw_binary {
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010042 name: "vmbase_example_bin",
43 stem: "vmbase_example.bin",
44 src: ":vmbase_example",
Andrew Walbraneef98202022-04-27 16:23:06 +000045 enabled: false,
46 target: {
47 android_arm64: {
48 enabled: true,
49 },
50 },
51}
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000052
53rust_test {
54 name: "vmbase_example.integration_test",
55 crate_name: "vmbase_example_test",
56 srcs: ["tests/test.rs"],
57 prefer_rlib: true,
58 edition: "2021",
59 rustlibs: [
60 "android.system.virtualizationservice-rust",
Pierre-Clément Tosi0d1aed02022-11-17 17:06:28 +000061 "libandroid_logger",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000062 "libanyhow",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000063 "liblibc",
64 "liblog_rust",
Pierre-Clément Tosi0d1aed02022-11-17 17:06:28 +000065 "libnix",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000066 "libvmclient",
67 ],
68 data: [
Pierre-Clément Tosib1300352022-09-09 11:01:06 +010069 ":vmbase_example_bin",
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000070 ],
71 test_suites: ["general-tests"],
72 enabled: false,
73 target: {
74 android_arm64: {
75 enabled: true,
76 },
77 },
78}