Bob Badour | d69ad69 | 2021-02-16 19:02:14 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["system_core_libutils_license"], |
| 3 | } |
| 4 | |
Bob Badour | d69ad69 | 2021-02-16 19:02:14 -0800 | [diff] [blame] | 5 | license { |
| 6 | name: "system_core_libutils_license", |
| 7 | visibility: [":__subpackages__"], |
| 8 | license_kinds: [ |
| 9 | "SPDX-license-identifier-Apache-2.0", |
| 10 | ], |
| 11 | license_text: [ |
| 12 | "NOTICE", |
| 13 | ], |
| 14 | } |
| 15 | |
Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 16 | cc_library_headers { |
| 17 | name: "libutils_headers", |
Steven Moreland | 91527ed | 2017-04-11 12:43:16 -0700 | [diff] [blame] | 18 | vendor_available: true, |
Justin Yun | feef4d3 | 2020-11-11 19:17:40 +0900 | [diff] [blame] | 19 | product_available: true, |
Jiyong Park | 612210c | 2018-04-27 21:48:43 +0900 | [diff] [blame] | 20 | recovery_available: true, |
Yifan Hong | 55015ff | 2020-10-27 16:37:06 -0700 | [diff] [blame] | 21 | vendor_ramdisk_available: true, |
Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 22 | host_supported: true, |
dimitry | 454ba7e | 2019-05-16 13:48:17 +0200 | [diff] [blame] | 23 | native_bridge_supported: true, |
Zhi Dou | ff9e640 | 2022-12-09 22:30:57 +0000 | [diff] [blame] | 24 | defaults: [ |
| 25 | "apex-lowest-min-sdk-version", |
| 26 | ], |
Jiyong Park | 8bf9b16 | 2020-03-07 16:36:09 +0900 | [diff] [blame] | 27 | apex_available: [ |
| 28 | "//apex_available:platform", |
| 29 | "//apex_available:anyapex", |
| 30 | ], |
Steven Moreland | d3b4b2c | 2017-04-13 21:01:40 -0700 | [diff] [blame] | 31 | |
Jaesoo Lee | 1e8ac0f | 2017-04-20 16:56:45 +0900 | [diff] [blame] | 32 | header_libs: [ |
Jiyong Park | 705abe2 | 2021-12-14 22:55:34 +0900 | [diff] [blame] | 33 | "libbase_headers", |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 34 | "libcutils_headers", |
Jiyong Park | 8b196a7 | 2022-01-12 09:23:29 +0900 | [diff] [blame] | 35 | "liblog_headers", |
Jiyong Park | 8b196a7 | 2022-01-12 09:23:29 +0900 | [diff] [blame] | 36 | "libsystem_headers", |
Jaesoo Lee | 1e8ac0f | 2017-04-20 16:56:45 +0900 | [diff] [blame] | 37 | ], |
| 38 | export_header_lib_headers: [ |
Jiyong Park | 705abe2 | 2021-12-14 22:55:34 +0900 | [diff] [blame] | 39 | "libbase_headers", |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 40 | "libcutils_headers", |
Jiyong Park | 8b196a7 | 2022-01-12 09:23:29 +0900 | [diff] [blame] | 41 | "liblog_headers", |
Jiyong Park | 8b196a7 | 2022-01-12 09:23:29 +0900 | [diff] [blame] | 42 | "libsystem_headers", |
Jaesoo Lee | 1e8ac0f | 2017-04-20 16:56:45 +0900 | [diff] [blame] | 43 | ], |
Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 44 | export_include_dirs: ["include"], |
Steven Moreland | d3b4b2c | 2017-04-13 21:01:40 -0700 | [diff] [blame] | 45 | |
Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 46 | target: { |
Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 47 | linux_bionic: { |
| 48 | enabled: true, |
| 49 | }, |
Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 50 | windows: { |
Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 51 | enabled: true, |
| 52 | }, |
Vijay Venkatraman | 75acc7b | 2017-01-05 10:39:38 -0800 | [diff] [blame] | 53 | }, |
| 54 | } |
| 55 | |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 56 | cc_defaults { |
Tomasz Wasilczyk | 1578cb3 | 2023-11-21 08:56:06 -0800 | [diff] [blame] | 57 | name: "libutils_defaults_nodeps", |
Steven Moreland | 91527ed | 2017-04-11 12:43:16 -0700 | [diff] [blame] | 58 | vendor_available: true, |
Justin Yun | feef4d3 | 2020-11-11 19:17:40 +0900 | [diff] [blame] | 59 | product_available: true, |
Jiyong Park | 011ee12 | 2018-05-29 16:41:30 +0900 | [diff] [blame] | 60 | recovery_available: true, |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 61 | host_supported: true, |
| 62 | |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 63 | cflags: [ |
| 64 | "-Wall", |
| 65 | "-Werror", |
Elliott Hughes | 48a9eb4 | 2021-03-04 09:46:23 -0800 | [diff] [blame] | 66 | "-Wno-exit-time-destructors", |
Steven Moreland | a06e68c | 2021-04-27 00:09:23 +0000 | [diff] [blame] | 67 | "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 68 | ], |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 69 | |
Steven Moreland | 9c83202 | 2020-07-07 22:37:07 +0000 | [diff] [blame] | 70 | sanitize: { |
| 71 | misc_undefined: ["integer"], |
| 72 | }, |
Steven Moreland | 1f64241 | 2017-06-26 13:52:06 -0700 | [diff] [blame] | 73 | |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 74 | target: { |
| 75 | android: { |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 76 | cflags: ["-fvisibility=protected"], |
| 77 | |
| 78 | shared_libs: [ |
Jiyong Park | 0b3c24b | 2017-05-26 17:57:18 +0900 | [diff] [blame] | 79 | "libvndksupport", |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 80 | ], |
Dan Willemsen | e16bdb1 | 2016-07-13 00:20:20 -0700 | [diff] [blame] | 81 | |
| 82 | sanitize: { |
| 83 | misc_undefined: ["integer"], |
| 84 | }, |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 85 | }, |
| 86 | |
Jiyong Park | 011ee12 | 2018-05-29 16:41:30 +0900 | [diff] [blame] | 87 | recovery: { |
| 88 | exclude_shared_libs: ["libvndksupport"], |
| 89 | }, |
| 90 | |
Dan Willemsen | ab34b47 | 2016-11-29 13:32:55 -0800 | [diff] [blame] | 91 | linux_bionic: { |
| 92 | enabled: true, |
Dan Willemsen | ab34b47 | 2016-11-29 13:32:55 -0800 | [diff] [blame] | 93 | }, |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 94 | |
| 95 | darwin: { |
| 96 | cflags: ["-Wno-unused-parameter"], |
| 97 | }, |
| 98 | |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 99 | windows: { |
Dan Willemsen | 528f144 | 2017-11-29 18:06:11 -0800 | [diff] [blame] | 100 | cflags: [ |
| 101 | // Under MinGW, ctype.h doesn't need multi-byte support |
| 102 | "-DMB_CUR_MAX=1", |
| 103 | "-Wno-unused-private-field", |
| 104 | ], |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 105 | |
| 106 | enabled: true, |
| 107 | }, |
| 108 | }, |
Anis Assi | e75dd9a | 2022-03-08 19:48:19 +0000 | [diff] [blame] | 109 | fuzz_config: { |
Akshata Kadam | 541f850 | 2024-04-11 14:26:17 +0530 | [diff] [blame] | 110 | cc: ["smoreland@google.com"], |
Anis Assi | e75dd9a | 2022-03-08 19:48:19 +0000 | [diff] [blame] | 111 | }, |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 112 | } |
| 113 | |
Steven Moreland | 377adea | 2022-10-08 05:06:52 +0000 | [diff] [blame] | 114 | cc_defaults { |
Tomasz Wasilczyk | 1578cb3 | 2023-11-21 08:56:06 -0800 | [diff] [blame] | 115 | name: "libutils_defaults", |
| 116 | defaults: [ |
| 117 | "libutils_defaults_nodeps", |
| 118 | ], |
| 119 | |
| 120 | shared_libs: [ |
| 121 | "libcutils", |
| 122 | "liblog", |
| 123 | ], |
| 124 | } |
| 125 | |
| 126 | cc_defaults { |
Steven Moreland | 377adea | 2022-10-08 05:06:52 +0000 | [diff] [blame] | 127 | name: "libutils_impl_defaults", |
Zhi Dou | ff9e640 | 2022-12-09 22:30:57 +0000 | [diff] [blame] | 128 | defaults: [ |
| 129 | "libutils_defaults", |
| 130 | "apex-lowest-min-sdk-version", |
| 131 | ], |
dimitry | 454ba7e | 2019-05-16 13:48:17 +0200 | [diff] [blame] | 132 | native_bridge_supported: true, |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 133 | |
Steven Moreland | 7a1ca59 | 2023-10-07 01:09:39 +0000 | [diff] [blame] | 134 | whole_static_libs: ["libutils_binder"], |
| 135 | |
Steven Moreland | c738370 | 2023-10-21 00:43:52 +0000 | [diff] [blame] | 136 | header_libs: [ |
| 137 | "libbase_headers", |
| 138 | "libutils_headers", |
| 139 | ], |
| 140 | export_header_lib_headers: [ |
| 141 | "libutils_headers", |
| 142 | ], |
| 143 | |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 144 | srcs: [ |
| 145 | "FileMap.cpp", |
| 146 | "JenkinsHash.cpp", |
Steven Moreland | c2dc7cd | 2021-05-04 21:27:56 +0000 | [diff] [blame] | 147 | "LightRefBase.cpp", |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 148 | "NativeHandle.cpp", |
| 149 | "Printer.cpp", |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 150 | "StopWatch.cpp", |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 151 | "SystemClock.cpp", |
| 152 | "Threads.cpp", |
| 153 | "Timers.cpp", |
| 154 | "Tokenizer.cpp", |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 155 | "misc.cpp", |
| 156 | ], |
| 157 | |
| 158 | target: { |
| 159 | android: { |
| 160 | srcs: [ |
| 161 | "Trace.cpp", |
| 162 | ], |
| 163 | }, |
| 164 | linux: { |
Josh Gao | f0ea1e6 | 2019-01-02 14:31:26 -0800 | [diff] [blame] | 165 | header_libs: ["libbase_headers"], |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 166 | srcs: [ |
| 167 | "Looper.cpp", |
| 168 | ], |
| 169 | }, |
| 170 | }, |
Jeffrey Huang | 18986cb | 2020-02-12 17:06:05 -0800 | [diff] [blame] | 171 | |
| 172 | apex_available: [ |
| 173 | "//apex_available:anyapex", |
| 174 | "//apex_available:platform", |
| 175 | ], |
Yi Kong | 6ee028f | 2021-12-23 15:57:40 +0800 | [diff] [blame] | 176 | |
| 177 | afdo: true, |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 178 | } |
| 179 | |
| 180 | cc_library { |
Steven Moreland | 377adea | 2022-10-08 05:06:52 +0000 | [diff] [blame] | 181 | name: "libutils", |
| 182 | defaults: ["libutils_impl_defaults"], |
| 183 | |
Kiyoung Kim | ad8cf52 | 2024-03-11 13:04:38 +0900 | [diff] [blame] | 184 | double_loadable: true, |
Hsin-Yi Chen | 3de02bd | 2022-12-06 17:19:42 +0800 | [diff] [blame] | 185 | |
Hsin-Yi Chen | e474f21 | 2023-09-04 11:16:34 +0800 | [diff] [blame] | 186 | target: { |
| 187 | product: { |
| 188 | header_abi_checker: { |
Hsin-Yi Chen | e5b667b | 2024-01-08 18:49:37 +0800 | [diff] [blame] | 189 | enabled: true, |
Hsin-Yi Chen | e474f21 | 2023-09-04 11:16:34 +0800 | [diff] [blame] | 190 | // AFDO affects weak symbols. |
| 191 | diff_flags: ["-allow-adding-removing-weak-symbols"], |
| 192 | ref_dump_dirs: ["abi-dumps"], |
| 193 | }, |
| 194 | }, |
| 195 | vendor: { |
| 196 | header_abi_checker: { |
Hsin-Yi Chen | e5b667b | 2024-01-08 18:49:37 +0800 | [diff] [blame] | 197 | enabled: true, |
Hsin-Yi Chen | e474f21 | 2023-09-04 11:16:34 +0800 | [diff] [blame] | 198 | // AFDO affects weak symbols. |
| 199 | diff_flags: ["-allow-adding-removing-weak-symbols"], |
| 200 | ref_dump_dirs: ["abi-dumps"], |
| 201 | }, |
| 202 | }, |
Hsin-Yi Chen | 3de02bd | 2022-12-06 17:19:42 +0800 | [diff] [blame] | 203 | }, |
Steven Moreland | 377adea | 2022-10-08 05:06:52 +0000 | [diff] [blame] | 204 | } |
| 205 | |
| 206 | cc_library { |
| 207 | name: "libutils_test_compile", |
| 208 | defaults: ["libutils_impl_defaults"], |
| 209 | |
| 210 | cflags: [ |
Kai Sky | 862f049 | 2023-11-24 14:20:20 +0000 | [diff] [blame] | 211 | "-DDEBUG_CALLBACKS=1", |
Steven Moreland | 377adea | 2022-10-08 05:06:52 +0000 | [diff] [blame] | 212 | "-DDEBUG_POLL_AND_WAKE=1", |
| 213 | "-DDEBUG_REFS=1", |
| 214 | "-DDEBUG_TOKENIZER=1", |
| 215 | ], |
| 216 | |
| 217 | visibility: [":__subpackages__"], |
| 218 | } |
| 219 | |
| 220 | cc_library { |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 221 | name: "libutilscallstack", |
| 222 | defaults: ["libutils_defaults"], |
Victor Khimenko | 7428c52 | 2020-06-18 22:01:13 +0200 | [diff] [blame] | 223 | // TODO(b/153609531): remove when no longer needed. |
| 224 | native_bridge_supported: true, |
Steven Moreland | 6c509ca | 2022-04-11 22:30:07 +0000 | [diff] [blame] | 225 | min_sdk_version: "29", |
Kiyoung Kim | ad8cf52 | 2024-03-11 13:04:38 +0900 | [diff] [blame] | 226 | double_loadable: true, |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 227 | |
Steven Moreland | c738370 | 2023-10-21 00:43:52 +0000 | [diff] [blame] | 228 | header_libs: [ |
| 229 | "libbase_headers", |
| 230 | "libutils_headers", |
| 231 | ], |
| 232 | export_header_lib_headers: [ |
| 233 | "libutils_headers", |
| 234 | ], |
| 235 | |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 236 | srcs: [ |
| 237 | "CallStack.cpp", |
| 238 | ], |
| 239 | |
Steven Moreland | e6132be | 2019-03-25 20:38:56 -0700 | [diff] [blame] | 240 | shared_libs: [ |
Dylan Katz | 9d5845b | 2020-05-11 15:44:01 -0700 | [diff] [blame] | 241 | "libutils", |
Christopher Ferris | ab63124 | 2022-05-10 16:13:02 -0700 | [diff] [blame] | 242 | "libunwindstack", |
Steven Moreland | e6132be | 2019-03-25 20:38:56 -0700 | [diff] [blame] | 243 | ], |
| 244 | |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 245 | target: { |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 246 | linux: { |
| 247 | srcs: [ |
| 248 | "ProcessCallStack.cpp", |
| 249 | ], |
| 250 | }, |
Steven Moreland | d33a2ee | 2019-04-01 15:01:53 -0700 | [diff] [blame] | 251 | darwin: { |
| 252 | enabled: false, |
| 253 | }, |
Steven Moreland | e6132be | 2019-03-25 20:38:56 -0700 | [diff] [blame] | 254 | windows: { |
| 255 | enabled: false, |
| 256 | }, |
David Sehr | abfb9f3 | 2018-01-17 17:07:09 -0800 | [diff] [blame] | 257 | }, |
| 258 | } |
| 259 | |
Dylan Katz | 9d5845b | 2020-05-11 15:44:01 -0700 | [diff] [blame] | 260 | cc_defaults { |
| 261 | name: "libutils_fuzz_defaults", |
| 262 | host_supported: true, |
| 263 | shared_libs: [ |
| 264 | "libutils", |
| 265 | "libbase", |
Dylan Katz | 7168f27 | 2020-07-02 11:51:44 -0700 | [diff] [blame] | 266 | "liblog", |
Dylan Katz | 9d5845b | 2020-05-11 15:44:01 -0700 | [diff] [blame] | 267 | ], |
Akshata Kadam | 541f850 | 2024-04-11 14:26:17 +0530 | [diff] [blame] | 268 | fuzz_config: { |
| 269 | cc: [ |
| 270 | "smoreland@google.com", |
| 271 | ], |
| 272 | componentid: 128577, |
| 273 | description: "The fuzzer targets the APIs of libutils", |
| 274 | vector: "local_no_privileges_required", |
| 275 | service_privilege: "privileged", |
| 276 | users: "multi_user", |
| 277 | fuzzed_code_usage: "shipped", |
| 278 | }, |
Dylan Katz | 9d5845b | 2020-05-11 15:44:01 -0700 | [diff] [blame] | 279 | } |
| 280 | |
| 281 | cc_fuzz { |
| 282 | name: "libutils_fuzz_bitset", |
| 283 | defaults: ["libutils_fuzz_defaults"], |
| 284 | srcs: ["BitSet_fuzz.cpp"], |
| 285 | } |
| 286 | |
| 287 | cc_fuzz { |
| 288 | name: "libutils_fuzz_filemap", |
| 289 | defaults: ["libutils_fuzz_defaults"], |
| 290 | srcs: ["FileMap_fuzz.cpp"], |
| 291 | } |
| 292 | |
| 293 | cc_fuzz { |
Dylan Katz | 7168f27 | 2020-07-02 11:51:44 -0700 | [diff] [blame] | 294 | name: "libutils_fuzz_printer", |
| 295 | defaults: ["libutils_fuzz_defaults"], |
| 296 | srcs: ["Printer_fuzz.cpp"], |
| 297 | } |
| 298 | |
| 299 | cc_fuzz { |
| 300 | name: "libutils_fuzz_callstack", |
| 301 | defaults: ["libutils_fuzz_defaults"], |
| 302 | srcs: ["CallStack_fuzz.cpp"], |
| 303 | shared_libs: [ |
| 304 | "libutilscallstack", |
| 305 | ], |
| 306 | } |
| 307 | |
| 308 | cc_fuzz { |
| 309 | name: "libutils_fuzz_process_callstack", |
| 310 | defaults: ["libutils_fuzz_defaults"], |
| 311 | srcs: ["ProcessCallStack_fuzz.cpp"], |
| 312 | shared_libs: [ |
| 313 | "libutilscallstack", |
| 314 | ], |
| 315 | } |
| 316 | |
| 317 | cc_fuzz { |
Dylan Katz | 7168f27 | 2020-07-02 11:51:44 -0700 | [diff] [blame] | 318 | name: "libutils_fuzz_lrucache", |
| 319 | defaults: ["libutils_fuzz_defaults"], |
| 320 | srcs: ["LruCache_fuzz.cpp"], |
| 321 | } |
| 322 | |
| 323 | cc_fuzz { |
| 324 | name: "libutils_fuzz_looper", |
| 325 | defaults: ["libutils_fuzz_defaults"], |
| 326 | srcs: ["Looper_fuzz.cpp"], |
| 327 | } |
| 328 | |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 329 | cc_test { |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 330 | name: "libutils_test", |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 331 | host_supported: true, |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 332 | |
| 333 | srcs: [ |
| 334 | "BitSet_test.cpp", |
Christopher Ferris | 15fee82 | 2022-09-12 18:00:10 -0700 | [diff] [blame] | 335 | "CallStack_test.cpp", |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 336 | "FileMap_test.cpp", |
| 337 | "LruCache_test.cpp", |
| 338 | "Mutex_test.cpp", |
Yo Chiang | 5b028ba | 2020-07-10 19:34:53 +0800 | [diff] [blame] | 339 | "Singleton_test.cpp", |
Elliott Hughes | 842e1cc | 2020-05-27 12:24:30 -0700 | [diff] [blame] | 340 | "Timers_test.cpp", |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 341 | ], |
| 342 | |
| 343 | target: { |
| 344 | android: { |
| 345 | srcs: [ |
| 346 | "SystemClock_test.cpp", |
| 347 | ], |
| 348 | shared_libs: [ |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 349 | "libbase", |
Christopher Ferris | 15fee82 | 2022-09-12 18:00:10 -0700 | [diff] [blame] | 350 | "libcutils", |
| 351 | "liblog", |
| 352 | "liblzma", |
| 353 | "libunwindstack", |
| 354 | "libutils", |
| 355 | "libutilscallstack", |
| 356 | "libz", |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 357 | ], |
| 358 | }, |
| 359 | linux: { |
| 360 | srcs: [ |
| 361 | "Looper_test.cpp", |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 362 | ], |
| 363 | }, |
| 364 | host: { |
| 365 | static_libs: [ |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 366 | "libbase", |
Christopher Ferris | 15fee82 | 2022-09-12 18:00:10 -0700 | [diff] [blame] | 367 | "liblog", |
| 368 | "liblzma", |
| 369 | "libunwindstack_no_dex", |
| 370 | "libutils", |
| 371 | "libutilscallstack", |
Spandan Das | c4db546 | 2024-01-20 20:12:03 +0000 | [diff] [blame] | 372 | "libz", |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 373 | ], |
| 374 | }, |
| 375 | }, |
| 376 | |
Yo Chiang | 5b028ba | 2020-07-10 19:34:53 +0800 | [diff] [blame] | 377 | data_libs: [ |
| 378 | "libutils_test_singleton1", |
| 379 | "libutils_test_singleton2", |
| 380 | ], |
| 381 | |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 382 | cflags: [ |
| 383 | "-Wall", |
| 384 | "-Wextra", |
| 385 | "-Werror", |
| 386 | "-Wthread-safety", |
| 387 | ], |
Elliott Hughes | cb65c35 | 2019-02-20 15:23:34 -0800 | [diff] [blame] | 388 | |
| 389 | test_suites: ["device-tests"], |
| 390 | } |
| 391 | |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 392 | cc_test_library { |
| 393 | name: "libutils_test_singleton1", |
| 394 | host_supported: true, |
Yo Chiang | 5b028ba | 2020-07-10 19:34:53 +0800 | [diff] [blame] | 395 | installable: false, |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 396 | srcs: ["Singleton_test1.cpp"], |
Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 397 | cflags: [ |
| 398 | "-Wall", |
| 399 | "-Werror", |
| 400 | ], |
Jiyong Park | 705abe2 | 2021-12-14 22:55:34 +0900 | [diff] [blame] | 401 | header_libs: ["libutils_headers"], |
Dan Willemsen | 2e1591b | 2016-07-12 17:20:18 -0700 | [diff] [blame] | 402 | } |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 403 | |
| 404 | cc_test_library { |
| 405 | name: "libutils_test_singleton2", |
| 406 | host_supported: true, |
Yo Chiang | 5b028ba | 2020-07-10 19:34:53 +0800 | [diff] [blame] | 407 | installable: false, |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 408 | srcs: ["Singleton_test2.cpp"], |
| 409 | cflags: [ |
| 410 | "-Wall", |
| 411 | "-Werror", |
| 412 | ], |
| 413 | shared_libs: ["libutils_test_singleton1"], |
Jiyong Park | 705abe2 | 2021-12-14 22:55:34 +0900 | [diff] [blame] | 414 | header_libs: ["libutils_headers"], |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 415 | } |