blob: d540f4daf19288f93d5ca34f6578d261e7522b07 [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",
43 linker_scripts: ["image.ld"],
44 installable: false,
45 enabled: false,
46 target: {
47 android_arm64: {
48 enabled: true,
49 },
50 },
Florian Mayer1da97eb2022-06-14 14:15:50 -070051 sanitize: {
52 hwaddress: false,
53 },
Andrew Walbraneef98202022-04-27 16:23:06 +000054 apex_available: ["com.android.virt"],
55}
56
57raw_binary {
58 name: "vmbase_example",
59 src: ":vmbase_example_elf",
60 stem: "vmbase_example.bin",
61 enabled: false,
62 target: {
63 android_arm64: {
64 enabled: true,
65 },
66 },
67}
Andrew Walbran94bbf2f2022-05-12 18:35:42 +000068
69rust_test {
70 name: "vmbase_example.integration_test",
71 crate_name: "vmbase_example_test",
72 srcs: ["tests/test.rs"],
73 prefer_rlib: true,
74 edition: "2021",
75 rustlibs: [
76 "android.system.virtualizationservice-rust",
77 "libanyhow",
78 "libenv_logger",
79 "liblibc",
80 "liblog_rust",
81 "libvmclient",
82 ],
83 data: [
84 ":vmbase_example",
85 ],
86 test_suites: ["general-tests"],
87 enabled: false,
88 target: {
89 android_arm64: {
90 enabled: true,
91 },
92 },
93}