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 | |
Colin Cross | b65a462 | 2025-02-07 07:12:59 -0800 | [diff] [blame] | 43 | soong_config_module_type { |
| 44 | name: "virt_cc_defaults", |
| 45 | module_type: "cc_defaults", |
| 46 | config_namespace: "ANDROID", |
| 47 | bool_variables: [ |
| 48 | "avf_enabled", |
| 49 | ], |
| 50 | properties: [ |
| 51 | "apex_available", |
| 52 | ], |
| 53 | } |
| 54 | |
| 55 | virt_cc_defaults { |
| 56 | name: "libavf_apex_available_defaults", |
| 57 | soong_config_variables: { |
| 58 | avf_enabled: { |
| 59 | apex_available: ["com.android.virt"], |
| 60 | }, |
| 61 | }, |
| 62 | } |
| 63 | |
Inseob Kim | f3536de | 2024-11-22 14:00:57 +0900 | [diff] [blame] | 64 | cc_library { |
| 65 | name: "libavf", |
Colin Cross | b65a462 | 2025-02-07 07:12:59 -0800 | [diff] [blame] | 66 | defaults: ["libavf_apex_available_defaults"], |
Inseob Kim | f3536de | 2024-11-22 14:00:57 +0900 | [diff] [blame] | 67 | llndk: { |
| 68 | symbol_file: "libavf.map.txt", |
| 69 | moved_to_apex: true, |
| 70 | }, |
| 71 | whole_static_libs: ["libavf_impl"], |
| 72 | shared_libs: [ |
| 73 | "libbinder_ndk", |
| 74 | "libbinder_rpc_unstable", |
| 75 | "liblog", |
| 76 | ], |
Inseob Kim | e3e932d | 2024-12-16 20:06:57 +0900 | [diff] [blame] | 77 | export_include_dirs: ["include"], |
Inseob Kim | f3536de | 2024-11-22 14:00:57 +0900 | [diff] [blame] | 78 | version_script: "libavf.map.txt", |
| 79 | stubs: { |
| 80 | symbol_file: "libavf.map.txt", |
| 81 | }, |
| 82 | } |