Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2008 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
Bob Badour | d69ad69 | 2021-02-16 19:02:14 -0800 | [diff] [blame^] | 17 | package { |
| 18 | default_applicable_licenses: ["system_core_libcutils_license"], |
| 19 | } |
| 20 | |
| 21 | // Added automatically by a large-scale-change that took the approach of |
| 22 | // 'apply every license found to every target'. While this makes sure we respect |
| 23 | // every license restriction, it may not be entirely correct. |
| 24 | // |
| 25 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 26 | // |
| 27 | // Please consider splitting the single license below into multiple licenses, |
| 28 | // taking care not to lose any license_kind information, and overriding the |
| 29 | // default license using the 'licenses: [...]' property on targets as needed. |
| 30 | // |
| 31 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 32 | // to attach the license to, and including a comment whether the files may be |
| 33 | // used in the current project. |
| 34 | // See: http://go/android-license-faq |
| 35 | license { |
| 36 | name: "system_core_libcutils_license", |
| 37 | visibility: [":__subpackages__"], |
| 38 | license_kinds: [ |
| 39 | "SPDX-license-identifier-Apache-2.0", |
| 40 | "SPDX-license-identifier-BSD", |
| 41 | "SPDX-license-identifier-MIT", |
| 42 | ], |
| 43 | license_text: [ |
| 44 | "NOTICE", |
| 45 | ], |
| 46 | } |
| 47 | |
Tom Cherry | 167fbf5 | 2020-09-17 09:39:24 -0700 | [diff] [blame] | 48 | filegroup { |
| 49 | name: "android_filesystem_config_header", |
| 50 | srcs: ["include/private/android_filesystem_config.h"], |
| 51 | } |
| 52 | |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 53 | // some files must not be compiled when building against Mingw |
| 54 | // they correspond to features not used by our host development tools |
| 55 | // which are also hard or even impossible to port to native Win32 |
| 56 | libcutils_nonwindows_sources = [ |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 57 | "fs.cpp", |
Elliott Hughes | 9d12725 | 2018-07-13 10:54:49 -0700 | [diff] [blame] | 58 | "hashmap.cpp", |
Jeff Sharkey | 53d37ba | 2017-11-09 17:41:09 -0700 | [diff] [blame] | 59 | "multiuser.cpp", |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 60 | "str_parms.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 61 | ] |
| 62 | |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 63 | cc_library_headers { |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 64 | name: "libcutils_headers", |
Steven Moreland | 385fe69 | 2017-04-13 14:29:58 -0700 | [diff] [blame] | 65 | vendor_available: true, |
Justin Yun | feef4d3 | 2020-11-11 19:17:40 +0900 | [diff] [blame] | 66 | product_available: true, |
Jiyong Park | 612210c | 2018-04-27 21:48:43 +0900 | [diff] [blame] | 67 | recovery_available: true, |
Tom Cherry | a5edc0f | 2020-09-17 09:38:42 -0700 | [diff] [blame] | 68 | ramdisk_available: true, |
Yifan Hong | 55015ff | 2020-10-27 16:37:06 -0700 | [diff] [blame] | 69 | vendor_ramdisk_available: true, |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 70 | host_supported: true, |
Jiyong Park | 8bf9b16 | 2020-03-07 16:36:09 +0900 | [diff] [blame] | 71 | apex_available: [ |
| 72 | "//apex_available:platform", |
| 73 | "//apex_available:anyapex", |
| 74 | ], |
Jooyung Han | 88f00f2 | 2020-04-16 18:48:33 +0900 | [diff] [blame] | 75 | min_sdk_version: "29", |
dimitry | 051d5cb | 2019-05-16 14:17:00 +0200 | [diff] [blame] | 76 | native_bridge_supported: true, |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 77 | export_include_dirs: ["include"], |
| 78 | target: { |
Steven Moreland | 385fe69 | 2017-04-13 14:29:58 -0700 | [diff] [blame] | 79 | vendor: { |
Justin Yun | feef4d3 | 2020-11-11 19:17:40 +0900 | [diff] [blame] | 80 | override_export_include_dirs: ["include_outside_system"], |
| 81 | }, |
| 82 | product: { |
| 83 | override_export_include_dirs: ["include_outside_system"], |
Steven Moreland | 385fe69 | 2017-04-13 14:29:58 -0700 | [diff] [blame] | 84 | }, |
Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 85 | linux_bionic: { |
| 86 | enabled: true, |
| 87 | }, |
| 88 | windows: { |
| 89 | enabled: true, |
| 90 | }, |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 91 | }, |
| 92 | } |
| 93 | |
Josh Gao | a9b62d5 | 2020-02-19 13:50:57 -0800 | [diff] [blame] | 94 | // Socket specific parts of libcutils that are safe to statically link into an APEX. |
Josh Gao | 7f8a37c | 2020-03-09 15:20:55 -0700 | [diff] [blame] | 95 | cc_library { |
Josh Gao | a9b62d5 | 2020-02-19 13:50:57 -0800 | [diff] [blame] | 96 | name: "libcutils_sockets", |
| 97 | vendor_available: true, |
Justin Yun | feef4d3 | 2020-11-11 19:17:40 +0900 | [diff] [blame] | 98 | product_available: true, |
Josh Gao | a9b62d5 | 2020-02-19 13:50:57 -0800 | [diff] [blame] | 99 | recovery_available: true, |
Akilesh Kailash | dfb1e08 | 2020-09-30 01:34:42 +0000 | [diff] [blame] | 100 | ramdisk_available: true, |
Yifan Hong | 55015ff | 2020-10-27 16:37:06 -0700 | [diff] [blame] | 101 | vendor_ramdisk_available: true, |
Josh Gao | a9b62d5 | 2020-02-19 13:50:57 -0800 | [diff] [blame] | 102 | host_supported: true, |
| 103 | native_bridge_supported: true, |
| 104 | apex_available: [ |
| 105 | "//apex_available:platform", |
| 106 | "//apex_available:anyapex", |
| 107 | ], |
Jooyung Han | 88f00f2 | 2020-04-16 18:48:33 +0900 | [diff] [blame] | 108 | min_sdk_version: "29", |
Josh Gao | a9b62d5 | 2020-02-19 13:50:57 -0800 | [diff] [blame] | 109 | |
| 110 | export_include_dirs: ["include"], |
| 111 | |
Josh Gao | 7f8a37c | 2020-03-09 15:20:55 -0700 | [diff] [blame] | 112 | shared_libs: ["liblog"], |
Josh Gao | a9b62d5 | 2020-02-19 13:50:57 -0800 | [diff] [blame] | 113 | srcs: ["sockets.cpp"], |
| 114 | target: { |
| 115 | linux_bionic: { |
| 116 | enabled: true, |
| 117 | }, |
| 118 | |
| 119 | not_windows: { |
| 120 | srcs: [ |
| 121 | "socket_inaddr_any_server_unix.cpp", |
| 122 | "socket_local_client_unix.cpp", |
| 123 | "socket_local_server_unix.cpp", |
| 124 | "socket_network_client_unix.cpp", |
| 125 | "sockets_unix.cpp", |
| 126 | ], |
| 127 | }, |
| 128 | |
| 129 | // "not_windows" means "non-Windows host". |
| 130 | android: { |
| 131 | srcs: [ |
| 132 | "android_get_control_file.cpp", |
| 133 | "socket_inaddr_any_server_unix.cpp", |
| 134 | "socket_local_client_unix.cpp", |
| 135 | "socket_local_server_unix.cpp", |
| 136 | "socket_network_client_unix.cpp", |
| 137 | "sockets_unix.cpp", |
| 138 | ], |
| 139 | static_libs: ["libbase"], |
| 140 | }, |
| 141 | |
| 142 | windows: { |
| 143 | host_ldlibs: ["-lws2_32"], |
| 144 | srcs: [ |
| 145 | "socket_inaddr_any_server_windows.cpp", |
| 146 | "socket_network_client_windows.cpp", |
| 147 | "sockets_windows.cpp", |
| 148 | ], |
| 149 | |
| 150 | enabled: true, |
| 151 | cflags: [ |
| 152 | "-D_GNU_SOURCE", |
| 153 | ], |
| 154 | }, |
| 155 | }, |
| 156 | } |
| 157 | |
| 158 | cc_test { |
| 159 | name: "libcutils_sockets_test", |
| 160 | test_suites: ["device-tests"], |
| 161 | static_libs: ["libbase", "libcutils_sockets"], |
| 162 | cflags: [ |
| 163 | "-Wall", |
| 164 | "-Wextra", |
| 165 | "-Werror", |
| 166 | ], |
| 167 | |
| 168 | srcs: ["sockets_test.cpp"], |
| 169 | target: { |
| 170 | android: { |
| 171 | srcs: [ |
| 172 | "android_get_control_file_test.cpp", |
| 173 | "android_get_control_socket_test.cpp", |
| 174 | ], |
| 175 | }, |
| 176 | }, |
| 177 | } |
| 178 | |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 179 | cc_library { |
| 180 | name: "libcutils", |
Steven Moreland | 385fe69 | 2017-04-13 14:29:58 -0700 | [diff] [blame] | 181 | vendor_available: true, |
Justin Yun | feef4d3 | 2020-11-11 19:17:40 +0900 | [diff] [blame] | 182 | product_available: true, |
Justin Yun | 9ca9245 | 2017-07-31 15:41:10 +0900 | [diff] [blame] | 183 | vndk: { |
| 184 | enabled: true, |
| 185 | support_system_process: true, |
| 186 | }, |
Jiyong Park | 612210c | 2018-04-27 21:48:43 +0900 | [diff] [blame] | 187 | recovery_available: true, |
Yifan Hong | 55015ff | 2020-10-27 16:37:06 -0700 | [diff] [blame] | 188 | vendor_ramdisk_available: true, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 189 | host_supported: true, |
Jiyong Park | 8bf9b16 | 2020-03-07 16:36:09 +0900 | [diff] [blame] | 190 | apex_available: [ |
| 191 | "//apex_available:platform", |
| 192 | "//apex_available:anyapex", |
| 193 | ], |
Jooyung Han | 88f00f2 | 2020-04-16 18:48:33 +0900 | [diff] [blame] | 194 | min_sdk_version: "29", |
dimitry | 051d5cb | 2019-05-16 14:17:00 +0200 | [diff] [blame] | 195 | native_bridge_supported: true, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 196 | srcs: [ |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 197 | "config_utils.cpp", |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 198 | "canned_fs_config.cpp", |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 199 | "iosched_policy.cpp", |
| 200 | "load_file.cpp", |
| 201 | "native_handle.cpp", |
S Vasudev Prasad | 100b08a | 2020-05-08 11:45:45 +0530 | [diff] [blame] | 202 | "properties.cpp", |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 203 | "record_stream.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 204 | "strlcpy.c", |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 205 | "threads.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 206 | ], |
| 207 | |
| 208 | target: { |
Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 209 | linux_bionic: { |
| 210 | enabled: true, |
Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 211 | }, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 212 | not_windows: { |
| 213 | srcs: libcutils_nonwindows_sources + [ |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 214 | "ashmem-host.cpp", |
Jiyong Park | a2159c4 | 2019-02-03 00:34:29 +0900 | [diff] [blame] | 215 | "fs_config.cpp", |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 216 | "trace-host.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 217 | ], |
| 218 | }, |
| 219 | windows: { |
Steven Moreland | e6132be | 2019-03-25 20:38:56 -0700 | [diff] [blame] | 220 | host_ldlibs: ["-lws2_32"], |
| 221 | |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 222 | srcs: [ |
David Sehr | eb2dd20 | 2018-12-20 12:59:36 -0800 | [diff] [blame] | 223 | "trace-host.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 224 | ], |
| 225 | |
| 226 | enabled: true, |
Mark Salyzyn | 163ecc6 | 2017-05-02 08:56:15 -0700 | [diff] [blame] | 227 | cflags: [ |
| 228 | "-D_GNU_SOURCE", |
| 229 | ], |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 230 | }, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 231 | android: { |
| 232 | srcs: libcutils_nonwindows_sources + [ |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 233 | "android_reboot.cpp", |
| 234 | "ashmem-dev.cpp", |
Jiyong Park | a2159c4 | 2019-02-03 00:34:29 +0900 | [diff] [blame] | 235 | "fs_config.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 236 | "klog.cpp", |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 237 | "partition_utils.cpp", |
Chenbo Feng | baede73 | 2017-10-25 12:31:43 -0700 | [diff] [blame] | 238 | "qtaguid.cpp", |
Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 239 | "trace-dev.cpp", |
Luis Hector Chavez | e97a4b9 | 2017-11-02 14:17:43 -0700 | [diff] [blame] | 240 | "uevent.cpp", |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 241 | ], |
Luis Hector Chavez | fae195b | 2017-11-03 16:22:05 -0700 | [diff] [blame] | 242 | }, |
| 243 | |
| 244 | android_arm: { |
Luis Hector Chavez | fae195b | 2017-11-03 16:22:05 -0700 | [diff] [blame] | 245 | sanitize: { |
| 246 | misc_undefined: ["integer"], |
| 247 | }, |
| 248 | }, |
| 249 | android_arm64: { |
Luis Hector Chavez | fae195b | 2017-11-03 16:22:05 -0700 | [diff] [blame] | 250 | sanitize: { |
| 251 | misc_undefined: ["integer"], |
| 252 | }, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 253 | }, |
| 254 | |
| 255 | android_x86: { |
Luis Hector Chavez | fae195b | 2017-11-03 16:22:05 -0700 | [diff] [blame] | 256 | // TODO: This is to work around b/29412086. |
| 257 | // Remove once __mulodi4 is available and move the "sanitize" block |
| 258 | // to the android target. |
| 259 | sanitize: { |
| 260 | misc_undefined: [], |
| 261 | }, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 262 | }, |
| 263 | |
| 264 | android_x86_64: { |
Luis Hector Chavez | fae195b | 2017-11-03 16:22:05 -0700 | [diff] [blame] | 265 | sanitize: { |
| 266 | misc_undefined: ["integer"], |
| 267 | }, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 268 | }, |
Logan Chien | 25b742c | 2018-05-08 17:37:29 +0800 | [diff] [blame] | 269 | |
Justin Yun | feef4d3 | 2020-11-11 19:17:40 +0900 | [diff] [blame] | 270 | // qtaguid.cpp loads libnetd_client.so with dlopen(). Since |
| 271 | // the interface of libnetd_client.so may vary between AOSP |
| 272 | // releases, exclude qtaguid.cpp from the VNDK-SP variant. |
Logan Chien | 25b742c | 2018-05-08 17:37:29 +0800 | [diff] [blame] | 273 | vendor: { |
| 274 | exclude_srcs: [ |
Logan Chien | 25b742c | 2018-05-08 17:37:29 +0800 | [diff] [blame] | 275 | "qtaguid.cpp", |
| 276 | ], |
Justin Yun | feef4d3 | 2020-11-11 19:17:40 +0900 | [diff] [blame] | 277 | }, |
| 278 | product: { |
| 279 | exclude_srcs: [ |
| 280 | "qtaguid.cpp", |
| 281 | ], |
| 282 | }, |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 283 | }, |
| 284 | |
Josh Gao | a9b62d5 | 2020-02-19 13:50:57 -0800 | [diff] [blame] | 285 | whole_static_libs: ["libcutils_sockets"], |
Joel Fernandes | 5194404 | 2018-12-18 13:32:31 -0800 | [diff] [blame] | 286 | shared_libs: [ |
| 287 | "liblog", |
| 288 | "libbase", |
| 289 | ], |
Steven Moreland | d73be1b | 2017-04-13 23:48:57 -0700 | [diff] [blame] | 290 | header_libs: [ |
Elliott Hughes | 9f49508 | 2018-04-25 14:52:50 -0700 | [diff] [blame] | 291 | "libbase_headers", |
Steven Moreland | d73be1b | 2017-04-13 23:48:57 -0700 | [diff] [blame] | 292 | "libcutils_headers", |
| 293 | "libutils_headers", |
Suren Baghdasaryan | 1bd127b | 2019-01-25 05:30:52 +0000 | [diff] [blame] | 294 | "libprocessgroup_headers", |
Steven Moreland | d73be1b | 2017-04-13 23:48:57 -0700 | [diff] [blame] | 295 | ], |
Suren Baghdasaryan | 1bd127b | 2019-01-25 05:30:52 +0000 | [diff] [blame] | 296 | export_header_lib_headers: [ |
| 297 | "libcutils_headers", |
| 298 | "libprocessgroup_headers", |
| 299 | ], |
Yifan Hong | b680712 | 2017-07-25 15:24:04 -0700 | [diff] [blame] | 300 | local_include_dirs: ["include"], |
Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 301 | |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 302 | cflags: [ |
| 303 | "-Werror", |
| 304 | "-Wall", |
| 305 | "-Wextra", |
| 306 | ], |
Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 307 | } |
| 308 | |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 309 | cc_defaults { |
| 310 | name: "libcutils_test_default", |
Elliott Hughes | 7e42484 | 2019-11-12 20:20:42 -0800 | [diff] [blame] | 311 | srcs: [ |
| 312 | "native_handle_test.cpp", |
S Vasudev Prasad | 100b08a | 2020-05-08 11:45:45 +0530 | [diff] [blame] | 313 | "properties_test.cpp", |
Elliott Hughes | 7e42484 | 2019-11-12 20:20:42 -0800 | [diff] [blame] | 314 | "sockets_test.cpp", |
| 315 | ], |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 316 | |
| 317 | target: { |
| 318 | android: { |
| 319 | srcs: [ |
| 320 | "android_get_control_file_test.cpp", |
| 321 | "android_get_control_socket_test.cpp", |
| 322 | "ashmem_test.cpp", |
| 323 | "fs_config_test.cpp", |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 324 | "multiuser_test.cpp", |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 325 | "sched_policy_test.cpp", |
| 326 | "str_parms_test.cpp", |
| 327 | "trace-dev_test.cpp", |
| 328 | ], |
| 329 | }, |
| 330 | |
| 331 | not_windows: { |
| 332 | srcs: [ |
| 333 | "str_parms_test.cpp", |
| 334 | ], |
| 335 | }, |
| 336 | }, |
| 337 | |
| 338 | cflags: [ |
| 339 | "-Wall", |
| 340 | "-Wextra", |
| 341 | "-Werror", |
| 342 | ], |
| 343 | } |
| 344 | |
| 345 | test_libraries = [ |
| 346 | "libcutils", |
| 347 | "liblog", |
| 348 | "libbase", |
| 349 | "libjsoncpp", |
| 350 | "libprocessgroup", |
Yifan Hong | 53e0deb | 2019-03-22 17:01:08 -0700 | [diff] [blame] | 351 | "libcgrouprc", |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 352 | ] |
| 353 | |
| 354 | cc_test { |
| 355 | name: "libcutils_test", |
| 356 | test_suites: ["device-tests"], |
| 357 | defaults: ["libcutils_test_default"], |
| 358 | host_supported: true, |
| 359 | shared_libs: test_libraries, |
Tom Cherry | e41aded | 2019-11-07 14:06:21 -0800 | [diff] [blame] | 360 | require_root: true, |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 361 | } |
| 362 | |
nelsonli | d83f390 | 2020-01-16 17:20:18 +0800 | [diff] [blame] | 363 | cc_defaults { |
| 364 | name: "libcutils_test_static_defaults", |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 365 | defaults: ["libcutils_test_default"], |
Yifan Hong | 53e0deb | 2019-03-22 17:01:08 -0700 | [diff] [blame] | 366 | static_libs: [ |
| 367 | "libc", |
| 368 | "libcgrouprc_format", |
| 369 | ] + test_libraries, |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 370 | stl: "libc++_static", |
Tom Cherry | e41aded | 2019-11-07 14:06:21 -0800 | [diff] [blame] | 371 | require_root: true, |
Elliott Hughes | 01705e4 | 2019-02-07 12:41:37 -0800 | [diff] [blame] | 372 | |
| 373 | target: { |
| 374 | android: { |
| 375 | static_executable: true, |
| 376 | }, |
| 377 | windows: { |
| 378 | host_ldlibs: ["-lws2_32"], |
| 379 | |
| 380 | enabled: true, |
| 381 | }, |
| 382 | }, |
| 383 | } |
nelsonli | d83f390 | 2020-01-16 17:20:18 +0800 | [diff] [blame] | 384 | |
| 385 | cc_test { |
| 386 | name: "libcutils_test_static", |
| 387 | test_suites: ["device-tests"], |
| 388 | defaults: ["libcutils_test_static_defaults"], |
| 389 | } |
| 390 | |
| 391 | cc_test { |
| 392 | name: "KernelLibcutilsTest", |
Dan Shi | a7b9a2b | 2020-04-06 16:11:29 -0700 | [diff] [blame] | 393 | test_suites: ["general-tests", "vts"], |
nelsonli | d83f390 | 2020-01-16 17:20:18 +0800 | [diff] [blame] | 394 | defaults: ["libcutils_test_static_defaults"], |
| 395 | test_config: "KernelLibcutilsTest.xml", |
| 396 | } |