Steven Moreland | 7a1ca59 | 2023-10-07 01:09:39 +0000 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["system_core_libutils_license"], |
| 3 | } |
| 4 | |
| 5 | cc_defaults { |
Tomasz Wasilczyk | 1578cb3 | 2023-11-21 08:56:06 -0800 | [diff] [blame] | 6 | name: "libutils_binder_impl_defaults_nodeps", |
Steven Moreland | 7a1ca59 | 2023-10-07 01:09:39 +0000 | [diff] [blame] | 7 | defaults: [ |
Tomasz Wasilczyk | 1578cb3 | 2023-11-21 08:56:06 -0800 | [diff] [blame] | 8 | "libutils_defaults_nodeps", |
Steven Moreland | 7a1ca59 | 2023-10-07 01:09:39 +0000 | [diff] [blame] | 9 | "apex-lowest-min-sdk-version", |
| 10 | ], |
| 11 | native_bridge_supported: true, |
| 12 | |
Steven Moreland | c738370 | 2023-10-21 00:43:52 +0000 | [diff] [blame] | 13 | export_include_dirs: ["include"], |
Steven Moreland | 7a1ca59 | 2023-10-07 01:09:39 +0000 | [diff] [blame] | 14 | srcs: [ |
| 15 | "Errors.cpp", |
| 16 | "RefBase.cpp", |
| 17 | "SharedBuffer.cpp", |
| 18 | "String16.cpp", |
| 19 | "String8.cpp", |
| 20 | "StrongPointer.cpp", |
| 21 | "Unicode.cpp", |
| 22 | "VectorImpl.cpp", |
| 23 | ], |
| 24 | |
| 25 | apex_available: [ |
| 26 | "//apex_available:anyapex", |
| 27 | "//apex_available:platform", |
| 28 | ], |
| 29 | |
| 30 | afdo: true, |
| 31 | } |
| 32 | |
Tomasz Wasilczyk | 1578cb3 | 2023-11-21 08:56:06 -0800 | [diff] [blame] | 33 | cc_defaults { |
| 34 | name: "libutils_binder_impl_defaults", |
| 35 | defaults: [ |
| 36 | "libutils_defaults", |
| 37 | "libutils_binder_impl_defaults_nodeps", |
| 38 | ], |
| 39 | } |
| 40 | |
Steven Moreland | 7a1ca59 | 2023-10-07 01:09:39 +0000 | [diff] [blame] | 41 | cc_library { |
| 42 | name: "libutils_binder", |
| 43 | defaults: ["libutils_binder_impl_defaults"], |
| 44 | } |
| 45 | |
Tomasz Wasilczyk | 1578cb3 | 2023-11-21 08:56:06 -0800 | [diff] [blame] | 46 | cc_library_shared { |
| 47 | name: "libutils_binder_sdk", |
| 48 | defaults: ["libutils_binder_impl_defaults_nodeps"], |
| 49 | |
| 50 | header_libs: [ |
| 51 | "liblog_stub", |
| 52 | ], |
| 53 | |
| 54 | cflags: [ |
| 55 | "-DANDROID_LOG_STUB_WEAK_PRINT", |
| 56 | "-DANDROID_UTILS_CALLSTACK_ENABLED=0", |
| 57 | ], |
| 58 | } |
| 59 | |
Steven Moreland | 7a1ca59 | 2023-10-07 01:09:39 +0000 | [diff] [blame] | 60 | cc_library { |
| 61 | name: "libutils_binder_test_compile", |
| 62 | defaults: ["libutils_binder_impl_defaults"], |
| 63 | |
| 64 | cflags: [ |
| 65 | "-DDEBUG_REFS=1", |
| 66 | ], |
| 67 | |
| 68 | visibility: [":__subpackages__"], |
| 69 | } |
| 70 | |
| 71 | cc_fuzz { |
| 72 | name: "libutils_fuzz_string8", |
| 73 | defaults: ["libutils_fuzz_defaults"], |
| 74 | srcs: ["String8_fuzz.cpp"], |
| 75 | } |
| 76 | |
| 77 | cc_fuzz { |
| 78 | name: "libutils_fuzz_string16", |
| 79 | defaults: ["libutils_fuzz_defaults"], |
| 80 | srcs: ["String16_fuzz.cpp"], |
| 81 | } |
| 82 | |
| 83 | cc_fuzz { |
| 84 | name: "libutils_fuzz_vector", |
| 85 | defaults: ["libutils_fuzz_defaults"], |
| 86 | srcs: ["Vector_fuzz.cpp"], |
| 87 | } |
| 88 | |
| 89 | cc_fuzz { |
| 90 | name: "libutils_fuzz_refbase", |
| 91 | defaults: ["libutils_fuzz_defaults"], |
| 92 | srcs: ["RefBase_fuzz.cpp"], |
| 93 | } |
| 94 | |
| 95 | cc_test { |
| 96 | name: "libutils_binder_test", |
| 97 | host_supported: true, |
| 98 | |
| 99 | srcs: [ |
| 100 | "Errors_test.cpp", |
| 101 | "SharedBuffer_test.cpp", |
| 102 | "String16_test.cpp", |
| 103 | "String8_test.cpp", |
| 104 | "StrongPointer_test.cpp", |
| 105 | "Unicode_test.cpp", |
| 106 | "Vector_test.cpp", |
| 107 | ], |
| 108 | |
| 109 | target: { |
| 110 | android: { |
| 111 | shared_libs: [ |
| 112 | "libbase", |
| 113 | "libcutils", |
| 114 | "liblog", |
| 115 | "liblzma", |
| 116 | "libutils", // which includes libutils_binder |
| 117 | "libz", |
| 118 | ], |
| 119 | }, |
| 120 | linux: { |
| 121 | srcs: [ |
| 122 | "RefBase_test.cpp", |
| 123 | ], |
| 124 | }, |
| 125 | host: { |
| 126 | static_libs: [ |
| 127 | "libbase", |
| 128 | "liblog", |
| 129 | "liblzma", |
| 130 | "libutils", // which includes libutils_binder |
| 131 | ], |
| 132 | }, |
| 133 | }, |
| 134 | |
| 135 | cflags: [ |
| 136 | "-Wall", |
| 137 | "-Wextra", |
| 138 | "-Werror", |
| 139 | "-Wthread-safety", |
| 140 | ], |
| 141 | |
| 142 | test_suites: ["device-tests"], |
| 143 | } |
| 144 | |
| 145 | cc_benchmark { |
| 146 | name: "libutils_binder_benchmark", |
| 147 | srcs: ["Vector_benchmark.cpp"], |
| 148 | shared_libs: ["libutils"], |
| 149 | } |