blob: c75820c7bc82ab65006b8ed27a8fe3b743f06321 [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",
7 crate_name: "vmbase_example",
8 srcs: ["src/main.rs"],
9 edition: "2021",
10 no_stdlibs: true,
11 stdlibs: [
12 "libcompiler_builtins.rust_sysroot",
13 "libcore.rust_sysroot",
14 ],
15 rustlibs: [
Andrew Walbran13564542022-04-20 16:29:45 +000016 "libaarch64_paging",
Andrew Walbranf7b6dc82022-04-20 16:24:30 +000017 "libbuddy_system_allocator",
Andrew Walbraneef98202022-04-27 16:23:06 +000018 "libvmbase",
19 ],
20 enabled: false,
21 target: {
22 android_arm64: {
23 enabled: true,
24 },
25 },
26 apex_available: ["com.android.virt"],
27}
28
29cc_binary {
30 name: "vmbase_example_elf",
31 stem: "vmbase_example",
32 srcs: [
33 "idmap.S",
34 ],
35 static_libs: [
36 "libvmbase_entry",
37 "libvmbase_example",
38 ],
39 static_executable: true,
40 nocrt: true,
41 system_shared_libs: ["libc"],
42 stl: "none",
Andrew Walbrana5b7af52022-07-06 15:06:20 +000043 linker_scripts: [
44 "image.ld",
45 ":vmbase_sections",
46 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000047 installable: false,
48 enabled: false,
49 target: {
50 android_arm64: {
51 enabled: true,
52 },
53 },
Florian Mayer1da97eb2022-06-14 14:15:50 -070054 sanitize: {
55 hwaddress: false,
56 },
Andrew Walbraneef98202022-04-27 16:23:06 +000057 apex_available: ["com.android.virt"],
58}
59
60raw_binary {
61 name: "vmbase_example",
62 src: ":vmbase_example_elf",
63 stem: "vmbase_example.bin",
64 enabled: false,
65 target: {
66 android_arm64: {
67 enabled: true,
68 },
69 },
70}
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000071
72rust_test {
73 name: "vmbase_example.integration_test",
74 crate_name: "vmbase_example_test",
75 srcs: ["tests/test.rs"],
76 prefer_rlib: true,
77 edition: "2021",
78 rustlibs: [
79 "android.system.virtualizationservice-rust",
80 "libanyhow",
81 "libenv_logger",
82 "liblibc",
83 "liblog_rust",
84 "libvmclient",
85 ],
86 data: [
87 ":vmbase_example",
88 ],
89 test_suites: ["general-tests"],
90 enabled: false,
91 target: {
92 android_arm64: {
93 enabled: true,
94 },
95 },
96}