Inseob Kim | f3536de | 2024-11-22 14:00:57 +0900 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
| 5 | rust_bindgen { |
| 6 | name: "libavf_bindgen", |
| 7 | wrapper_src: "include/android/virtualization.h", |
| 8 | crate_name: "avf_bindgen", |
| 9 | defaults: ["avf_build_flags_rust"], |
| 10 | source_stem: "bindings", |
| 11 | bindgen_flags: ["--default-enum-style rust"], |
| 12 | apex_available: ["com.android.virt"], |
Elie Kheirallah | 4531c60 | 2025-01-08 02:50:05 +0000 | [diff] [blame] | 13 | visibility: [ |
| 14 | "//packages/modules/Virtualization/tests/vts", |
| 15 | "//packages/modules/Virtualization/tests/old_images_avf_test", |
| 16 | ], |
Inseob Kim | f3536de | 2024-11-22 14:00:57 +0900 | [diff] [blame] | 17 | } |
| 18 | |
| 19 | rust_defaults { |
| 20 | name: "libavf.default", |
| 21 | crate_name: "avf", |
| 22 | defaults: ["avf_build_flags_rust"], |
| 23 | srcs: ["src/lib.rs"], |
| 24 | edition: "2021", |
| 25 | rustlibs: [ |
| 26 | "libvmclient", |
| 27 | "android.system.virtualizationcommon-rust", |
| 28 | "android.system.virtualizationservice-rust", |
| 29 | "libavf_bindgen", |
| 30 | "libbinder_rs", |
| 31 | "liblibc", |
| 32 | "liblog_rust", |
| 33 | "librpcbinder_rs", |
| 34 | ], |
| 35 | apex_available: ["com.android.virt"], |
| 36 | } |
| 37 | |
| 38 | rust_ffi_static { |
| 39 | name: "libavf_impl", |
| 40 | defaults: ["libavf.default"], |
Inseob Kim | f3536de | 2024-11-22 14:00:57 +0900 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | cc_library { |
| 44 | name: "libavf", |
| 45 | llndk: { |
| 46 | symbol_file: "libavf.map.txt", |
| 47 | moved_to_apex: true, |
| 48 | }, |
| 49 | whole_static_libs: ["libavf_impl"], |
| 50 | shared_libs: [ |
| 51 | "libbinder_ndk", |
| 52 | "libbinder_rpc_unstable", |
| 53 | "liblog", |
| 54 | ], |
Inseob Kim | e3e932d | 2024-12-16 20:06:57 +0900 | [diff] [blame] | 55 | export_include_dirs: ["include"], |
Inseob Kim | f3536de | 2024-11-22 14:00:57 +0900 | [diff] [blame] | 56 | version_script: "libavf.map.txt", |
| 57 | stubs: { |
| 58 | symbol_file: "libavf.map.txt", |
| 59 | }, |
Inseob Kim | 62c6de9 | 2025-03-19 15:23:37 +0900 | [diff] [blame] | 60 | apex_available: ["com.android.virt"], |
Inseob Kim | f3536de | 2024-11-22 14:00:57 +0900 | [diff] [blame] | 61 | } |