blob: e11bb2fc792facb36976c75019f63d56e7c60970 [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 {
21 name: "vmbase_example_elf",
22 stem: "vmbase_example",
David Brazdil30a7f082022-07-07 15:30:14 +010023 defaults: ["vmbase_elf_defaults"],
Andrew Walbraneef98202022-04-27 16:23:06 +000024 srcs: [
25 "idmap.S",
26 ],
27 static_libs: [
Andrew Walbraneef98202022-04-27 16:23:06 +000028 "libvmbase_example",
29 ],
Andrew Walbrana5b7af52022-07-06 15:06:20 +000030 linker_scripts: [
31 "image.ld",
32 ":vmbase_sections",
33 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000034 apex_available: ["com.android.virt"],
35}
36
37raw_binary {
38 name: "vmbase_example",
39 src: ":vmbase_example_elf",
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: [
63 ":vmbase_example",
64 ],
65 test_suites: ["general-tests"],
66 enabled: false,
67 target: {
68 android_arm64: {
69 enabled: true,
70 },
71 },
72}