| 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 |  | 
|  | 17 | // some files must not be compiled when building against Mingw | 
|  | 18 | // they correspond to features not used by our host development tools | 
|  | 19 | // which are also hard or even impossible to port to native Win32 | 
|  | 20 | libcutils_nonwindows_sources = [ | 
| Mark Salyzyn | 52bd37e | 2016-11-07 09:39:30 -0800 | [diff] [blame] | 21 | "android_get_control_file.cpp", | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 22 | "fs.cpp", | 
| Jeff Sharkey | 53d37ba | 2017-11-09 17:41:09 -0700 | [diff] [blame] | 23 | "multiuser.cpp", | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 24 | "socket_inaddr_any_server_unix.cpp", | 
|  | 25 | "socket_local_client_unix.cpp", | 
|  | 26 | "socket_local_server_unix.cpp", | 
|  | 27 | "socket_network_client_unix.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 28 | "sockets_unix.cpp", | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 29 | "str_parms.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 30 | ] | 
|  | 31 |  | 
| Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 32 | cc_library_headers { | 
| Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 33 | name: "libcutils_headers", | 
| Steven Moreland | 385fe69 | 2017-04-13 14:29:58 -0700 | [diff] [blame] | 34 | vendor_available: true, | 
| Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 35 | host_supported: true, | 
|  | 36 | export_include_dirs: ["include"], | 
|  | 37 | target: { | 
| Steven Moreland | 385fe69 | 2017-04-13 14:29:58 -0700 | [diff] [blame] | 38 | vendor: { | 
| Steven Moreland | e1c834d | 2018-01-05 14:42:12 -0800 | [diff] [blame] | 39 | override_export_include_dirs: ["include_vndk"], | 
| Steven Moreland | 385fe69 | 2017-04-13 14:29:58 -0700 | [diff] [blame] | 40 | }, | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 41 | linux_bionic: { | 
|  | 42 | enabled: true, | 
|  | 43 | }, | 
|  | 44 | windows: { | 
|  | 45 | enabled: true, | 
|  | 46 | }, | 
| Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 47 | }, | 
|  | 48 | } | 
|  | 49 |  | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 50 | cc_library { | 
|  | 51 | name: "libcutils", | 
| Steven Moreland | 385fe69 | 2017-04-13 14:29:58 -0700 | [diff] [blame] | 52 | vendor_available: true, | 
| Justin Yun | 9ca9245 | 2017-07-31 15:41:10 +0900 | [diff] [blame] | 53 | vndk: { | 
|  | 54 | enabled: true, | 
|  | 55 | support_system_process: true, | 
|  | 56 | }, | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 57 | host_supported: true, | 
|  | 58 | srcs: [ | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 59 | "config_utils.cpp", | 
| Mark Salyzyn | 163ecc6 | 2017-05-02 08:56:15 -0700 | [diff] [blame] | 60 | "fs_config.cpp", | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 61 | "canned_fs_config.cpp", | 
|  | 62 | "hashmap.cpp", | 
|  | 63 | "iosched_policy.cpp", | 
|  | 64 | "load_file.cpp", | 
|  | 65 | "native_handle.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 66 | "open_memstream.c", | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 67 | "record_stream.cpp", | 
| Isaac Chen | 795267d | 2017-02-16 11:47:33 +0800 | [diff] [blame] | 68 | "sched_policy.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 69 | "sockets.cpp", | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 70 | "strdup16to8.cpp", | 
|  | 71 | "strdup8to16.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 72 | "strlcpy.c", | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 73 | "threads.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 74 | ], | 
|  | 75 |  | 
|  | 76 | target: { | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 77 | linux_bionic: { | 
|  | 78 | enabled: true, | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 79 | }, | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 80 | not_windows: { | 
|  | 81 | srcs: libcutils_nonwindows_sources + [ | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 82 | "ashmem-host.cpp", | 
|  | 83 | "trace-host.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 84 | ], | 
|  | 85 | }, | 
|  | 86 | windows: { | 
|  | 87 | srcs: [ | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 88 | "socket_inaddr_any_server_windows.cpp", | 
|  | 89 | "socket_network_client_windows.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 90 | "sockets_windows.cpp", | 
|  | 91 | ], | 
|  | 92 |  | 
|  | 93 | enabled: true, | 
|  | 94 | shared: { | 
|  | 95 | enabled: false, | 
|  | 96 | }, | 
| Mark Salyzyn | 163ecc6 | 2017-05-02 08:56:15 -0700 | [diff] [blame] | 97 | cflags: [ | 
|  | 98 | "-D_GNU_SOURCE", | 
|  | 99 | ], | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 100 | }, | 
|  | 101 |  | 
|  | 102 | android: { | 
|  | 103 | srcs: libcutils_nonwindows_sources + [ | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 104 | "android_reboot.cpp", | 
|  | 105 | "ashmem-dev.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 106 | "klog.cpp", | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 107 | "partition_utils.cpp", | 
| Elliott Hughes | 4eacd70 | 2017-01-26 17:31:40 -0800 | [diff] [blame] | 108 | "properties.cpp", | 
| Chenbo Feng | baede73 | 2017-10-25 12:31:43 -0700 | [diff] [blame] | 109 | "qtaguid.cpp", | 
| Elliott Hughes | 8e9aeb9 | 2017-11-10 10:22:07 -0800 | [diff] [blame] | 110 | "trace-dev.cpp", | 
| Luis Hector Chavez | e97a4b9 | 2017-11-02 14:17:43 -0700 | [diff] [blame] | 111 | "uevent.cpp", | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 112 | ], | 
| Luis Hector Chavez | fae195b | 2017-11-03 16:22:05 -0700 | [diff] [blame] | 113 | }, | 
|  | 114 |  | 
|  | 115 | android_arm: { | 
|  | 116 | srcs: ["arch-arm/memset32.S"], | 
|  | 117 | sanitize: { | 
|  | 118 | misc_undefined: ["integer"], | 
|  | 119 | }, | 
|  | 120 | }, | 
|  | 121 | android_arm64: { | 
|  | 122 | srcs: ["arch-arm64/android_memset.S"], | 
| Evgenii Stepanov | 54c7886 | 2017-01-31 16:33:53 -0800 | [diff] [blame] | 123 | sanitize: { | 
|  | 124 | misc_undefined: ["integer"], | 
|  | 125 | }, | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 126 | }, | 
|  | 127 |  | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 128 | android_mips: { | 
|  | 129 | srcs: ["arch-mips/android_memset.c"], | 
| Luis Hector Chavez | fae195b | 2017-11-03 16:22:05 -0700 | [diff] [blame] | 130 | sanitize: { | 
|  | 131 | misc_undefined: ["integer"], | 
|  | 132 | }, | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 133 | }, | 
|  | 134 | android_mips64: { | 
|  | 135 | srcs: ["arch-mips/android_memset.c"], | 
| Luis Hector Chavez | fae195b | 2017-11-03 16:22:05 -0700 | [diff] [blame] | 136 | sanitize: { | 
|  | 137 | misc_undefined: ["integer"], | 
|  | 138 | }, | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 139 | }, | 
|  | 140 |  | 
|  | 141 | android_x86: { | 
|  | 142 | srcs: [ | 
|  | 143 | "arch-x86/android_memset16.S", | 
|  | 144 | "arch-x86/android_memset32.S", | 
|  | 145 | ], | 
| Luis Hector Chavez | fae195b | 2017-11-03 16:22:05 -0700 | [diff] [blame] | 146 | // TODO: This is to work around b/29412086. | 
|  | 147 | // Remove once __mulodi4 is available and move the "sanitize" block | 
|  | 148 | // to the android target. | 
|  | 149 | sanitize: { | 
|  | 150 | misc_undefined: [], | 
|  | 151 | }, | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 152 | }, | 
|  | 153 |  | 
|  | 154 | android_x86_64: { | 
|  | 155 | srcs: [ | 
|  | 156 | "arch-x86_64/android_memset16.S", | 
|  | 157 | "arch-x86_64/android_memset32.S", | 
|  | 158 | ], | 
| Luis Hector Chavez | fae195b | 2017-11-03 16:22:05 -0700 | [diff] [blame] | 159 | sanitize: { | 
|  | 160 | misc_undefined: ["integer"], | 
|  | 161 | }, | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 162 | }, | 
|  | 163 | }, | 
|  | 164 |  | 
|  | 165 | shared_libs: ["liblog"], | 
| Steven Moreland | d73be1b | 2017-04-13 23:48:57 -0700 | [diff] [blame] | 166 | header_libs: [ | 
|  | 167 | "libcutils_headers", | 
|  | 168 | "libutils_headers", | 
|  | 169 | ], | 
| Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 170 | export_header_lib_headers: ["libcutils_headers"], | 
| Yifan Hong | b680712 | 2017-07-25 15:24:04 -0700 | [diff] [blame] | 171 | local_include_dirs: ["include"], | 
| Vijay Venkatraman | 651f838 | 2017-01-25 18:52:17 +0000 | [diff] [blame] | 172 |  | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 173 | cflags: [ | 
|  | 174 | "-Werror", | 
|  | 175 | "-Wall", | 
|  | 176 | "-Wextra", | 
|  | 177 | ], | 
| Dan Willemsen | eee8e7f | 2016-06-06 22:31:58 -0700 | [diff] [blame] | 178 | } | 
|  | 179 |  | 
|  | 180 | subdirs = ["tests"] |