David Brazdil | 66fc120 | 2022-07-04 21:48:45 +0100 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
| 5 | rust_ffi_static { |
| 6 | name: "librialto", |
| 7 | crate_name: "rialto", |
| 8 | srcs: ["src/main.rs"], |
| 9 | edition: "2021", |
| 10 | defaults: ["vmbase_ffi_defaults"], |
| 11 | rustlibs: [ |
| 12 | "libaarch64_paging", |
| 13 | "libbuddy_system_allocator", |
| 14 | "libvmbase", |
| 15 | ], |
| 16 | apex_available: ["com.android.virt"], |
| 17 | } |
| 18 | |
| 19 | cc_binary { |
| 20 | name: "rialto_elf", |
| 21 | stem: "rialto", |
| 22 | defaults: ["vmbase_elf_defaults"], |
| 23 | srcs: [ |
| 24 | "idmap.S", |
| 25 | ], |
| 26 | static_libs: [ |
| 27 | "librialto", |
| 28 | "libvmbase_entry", |
| 29 | ], |
| 30 | linker_scripts: [ |
| 31 | "image.ld", |
| 32 | ":vmbase_sections", |
| 33 | ], |
| 34 | apex_available: ["com.android.virt"], |
| 35 | } |
| 36 | |
| 37 | raw_binary { |
| 38 | name: "rialto", |
| 39 | src: ":rialto_elf", |
| 40 | enabled: false, |
| 41 | target: { |
| 42 | android_arm64: { |
| 43 | enabled: true, |
| 44 | }, |
| 45 | }, |
| 46 | } |
| 47 | |
| 48 | rust_test { |
| 49 | name: "rialto_test", |
| 50 | crate_name: "rialto_test", |
| 51 | srcs: ["tests/test.rs"], |
| 52 | prefer_rlib: true, |
| 53 | edition: "2021", |
| 54 | rustlibs: [ |
| 55 | "android.system.virtualizationservice-rust", |
| 56 | "libandroid_logger", |
| 57 | "libanyhow", |
| 58 | "liblibc", |
| 59 | "liblog_rust", |
| 60 | "libnix", |
| 61 | "libvmclient", |
| 62 | ], |
| 63 | data: [ |
| 64 | ":rialto", |
| 65 | ], |
| 66 | test_suites: ["general-tests"], |
| 67 | enabled: false, |
| 68 | target: { |
| 69 | android_arm64: { |
| 70 | enabled: true, |
| 71 | }, |
| 72 | }, |
| 73 | } |