blob: 4011807fdd691110e4c4591536eed293e3ba5c74 [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",
David Brazdilb41aa8f2022-07-05 12:41:00 +010018 "liblog_rust_nostd",
Andrew Walbraneef98202022-04-27 16:23:06 +000019 "libvmbase",
20 ],
21 enabled: false,
22 target: {
23 android_arm64: {
24 enabled: true,
25 },
26 },
27 apex_available: ["com.android.virt"],
28}
29
30cc_binary {
31 name: "vmbase_example_elf",
32 stem: "vmbase_example",
33 srcs: [
34 "idmap.S",
35 ],
36 static_libs: [
37 "libvmbase_entry",
38 "libvmbase_example",
39 ],
40 static_executable: true,
41 nocrt: true,
42 system_shared_libs: ["libc"],
43 stl: "none",
Andrew Walbrana5b7af52022-07-06 15:06:20 +000044 linker_scripts: [
45 "image.ld",
46 ":vmbase_sections",
47 ],
Andrew Walbraneef98202022-04-27 16:23:06 +000048 installable: false,
49 enabled: false,
50 target: {
51 android_arm64: {
52 enabled: true,
53 },
54 },
Florian Mayer1da97eb2022-06-14 14:15:50 -070055 sanitize: {
56 hwaddress: false,
57 },
Andrew Walbraneef98202022-04-27 16:23:06 +000058 apex_available: ["com.android.virt"],
59}
60
61raw_binary {
62 name: "vmbase_example",
63 src: ":vmbase_example_elf",
Andrew Walbraneef98202022-04-27 16:23:06 +000064 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}