Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1 | // Define the common source files for all the libc instances |
| 2 | // ========================================================= |
| 3 | libc_common_src_files = [ |
Christopher Ferris | 7a3681e | 2017-04-24 17:48:32 -0700 | [diff] [blame] | 4 | "async_safe/async_safe_log.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 5 | "bionic/ether_aton.c", |
| 6 | "bionic/ether_ntoa.c", |
| 7 | "bionic/fts.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 8 | "bionic/initgroups.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 9 | "bionic/isatty.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 10 | "bionic/pututline.c", |
| 11 | "bionic/sched_cpualloc.c", |
| 12 | "bionic/sched_cpucount.c", |
| 13 | "bionic/sigblock.c", |
| 14 | "bionic/siginterrupt.c", |
| 15 | "bionic/sigsetmask.c", |
Elliott Hughes | 3a4c454 | 2017-07-19 17:20:24 -0700 | [diff] [blame] | 16 | "stdio/fmemopen.cpp", |
Elliott Hughes | 7f0849f | 2016-08-26 16:17:17 -0700 | [diff] [blame] | 17 | "stdio/parsefloat.c", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 18 | "stdio/refill.c", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 19 | "stdio/stdio.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 20 | "stdio/stdio_ext.cpp", |
Elliott Hughes | 7f0849f | 2016-08-26 16:17:17 -0700 | [diff] [blame] | 21 | "stdio/vfscanf.c", |
| 22 | "stdio/vfwscanf.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 23 | "stdlib/exit.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 24 | ] |
| 25 | |
| 26 | // Various kinds of cruft. |
| 27 | // ======================================================== |
| 28 | libc_common_src_files += [ |
| 29 | "bionic/ndk_cruft.cpp", |
| 30 | ] |
| 31 | |
| 32 | libc_common_src_files_32 = [ |
| 33 | "bionic/legacy_32_bit_support.cpp", |
| 34 | "bionic/time64.c", |
| 35 | ] |
| 36 | |
Elliott Hughes | 53cf348 | 2016-08-09 13:06:41 -0700 | [diff] [blame] | 37 | libc_common_flags = [ |
| 38 | "-D_LIBC=1", |
| 39 | "-Wall", |
| 40 | "-Wextra", |
| 41 | "-Wunused", |
| 42 | "-Wno-deprecated-declarations", |
Elliott Hughes | b348d5c | 2017-07-24 16:53:11 -0700 | [diff] [blame] | 43 | "-Wno-gcc-compat", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 44 | "-Wframe-larger-than=2048", |
Elliott Hughes | 53cf348 | 2016-08-09 13:06:41 -0700 | [diff] [blame] | 45 | |
| 46 | // Try to catch typical 32-bit assumptions that break with 64-bit pointers. |
| 47 | "-Werror=pointer-to-int-cast", |
| 48 | "-Werror=int-to-pointer-cast", |
| 49 | "-Werror=type-limits", |
| 50 | "-Werror", |
| 51 | ] |
| 52 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 53 | // Define some common cflags |
| 54 | // ======================================================== |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 55 | cc_defaults { |
| 56 | name: "libc_defaults", |
Dan Willemsen | 7ec52b1 | 2016-11-28 17:02:25 -0800 | [diff] [blame] | 57 | defaults: ["linux_bionic_supported"], |
Elliott Hughes | 53cf348 | 2016-08-09 13:06:41 -0700 | [diff] [blame] | 58 | cflags: libc_common_flags, |
| 59 | asflags: libc_common_flags, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 60 | conlyflags: ["-std=gnu99"], |
| 61 | cppflags: [], |
Christopher Ferris | 7a3681e | 2017-04-24 17:48:32 -0700 | [diff] [blame] | 62 | include_dirs: [ |
| 63 | "bionic/libc/async_safe/include", |
| 64 | "external/jemalloc/include", |
| 65 | ], |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 66 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 67 | stl: "none", |
| 68 | system_shared_libs: [], |
Colin Cross | 27c43c5 | 2016-04-07 13:27:24 -0700 | [diff] [blame] | 69 | sanitize: { |
| 70 | never: true, |
| 71 | }, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 72 | native_coverage: false, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 73 | } |
| 74 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 75 | // ANDROIDMK TRANSLATION ERROR: unsupported directive |
| 76 | // ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true) |
| 77 | //libc_common_cflags += ["-DDEBUG"] |
| 78 | // ANDROIDMK TRANSLATION ERROR: unsupported directive |
| 79 | // endif |
| 80 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 81 | // ======================================================== |
| 82 | // libc_stack_protector.a - stack protector code |
| 83 | // ======================================================== |
| 84 | // |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 85 | // Code that implements the stack protector (or that runs |
| 86 | // before TLS has been set up) needs to be compiled with |
| 87 | // -fno-stack-protector, since it accesses the stack canary |
| 88 | // TLS slot. |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 89 | |
| 90 | cc_library_static { |
| 91 | |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 92 | srcs: [ |
| 93 | "bionic/__libc_init_main_thread.cpp", |
| 94 | "bionic/__stack_chk_fail.cpp", |
| 95 | ], |
| 96 | arch: { |
| 97 | arm64: { |
| 98 | srcs: ["arch-arm64/bionic/__set_tls.c"], |
| 99 | }, |
| 100 | x86: { |
Dan Willemsen | 879cec2 | 2016-02-29 10:37:56 -0800 | [diff] [blame] | 101 | srcs: ["arch-x86/bionic/__set_tls.cpp"], |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 102 | }, |
| 103 | x86_64: { |
| 104 | srcs: ["arch-x86_64/bionic/__set_tls.c"], |
| 105 | }, |
| 106 | }, |
| 107 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 108 | defaults: ["libc_defaults"], |
| 109 | cflags: ["-fno-stack-protector"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 110 | name: "libc_stack_protector", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 111 | } |
| 112 | |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 113 | // libc_init_static.cpp also needs to be built without stack protector, |
| 114 | // because it's responsible for setting up TLS for static executables. |
| 115 | // This isn't the case for dynamic executables because the dynamic linker |
| 116 | // has already set up the main thread's TLS. |
| 117 | |
| 118 | cc_library_static { |
| 119 | name: "libc_init_static", |
| 120 | defaults: ["libc_defaults"], |
| 121 | srcs: ["bionic/libc_init_static.cpp"], |
| 122 | cflags: ["-fno-stack-protector"], |
| 123 | } |
| 124 | |
Stephen Crane | f4b1cbd | 2017-05-09 14:27:43 -0700 | [diff] [blame] | 125 | cc_library_static { |
| 126 | name: "libc_init_dynamic", |
| 127 | defaults: ["libc_defaults"], |
| 128 | srcs: ["bionic/libc_init_dynamic.cpp"], |
| 129 | cflags: ["-fno-stack-protector"], |
| 130 | } |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 131 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 132 | // ======================================================== |
| 133 | // libc_tzcode.a - upstream 'tzcode' code |
| 134 | // ======================================================== |
| 135 | |
| 136 | cc_library_static { |
| 137 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 138 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 139 | srcs: [ |
Dan Willemsen | 9c9aa74 | 2016-01-15 16:00:57 -0800 | [diff] [blame] | 140 | "tzcode/**/*.c", |
Elliott Hughes | 0e8616a | 2017-04-11 14:44:51 -0700 | [diff] [blame] | 141 | "tzcode/bionic.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 142 | "upstream-openbsd/lib/libc/time/wcsftime.c", // tzcode doesn't include wcsftime, so we use the OpenBSD one. |
| 143 | ], |
| 144 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 145 | cflags: [ |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 146 | "-Wno-unused-parameter", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 147 | // Don't use ridiculous amounts of stack. |
| 148 | "-DALL_STATE", |
| 149 | // Include tzsetwall, timelocal, timegm, time2posix, and posix2time. |
| 150 | "-DSTD_INSPIRED", |
Colin Cross | a35d23d | 2015-11-19 13:32:49 -0800 | [diff] [blame] | 151 | // Obviously, we want to be thread-safe. |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 152 | "-DTHREAD_SAFE", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 153 | // The name of the tm_gmtoff field in our struct tm. |
| 154 | "-DTM_GMTOFF=tm_gmtoff", |
| 155 | // Where we store our tzdata. |
Colin Cross | 7b29495 | 2016-09-29 14:08:13 -0700 | [diff] [blame] | 156 | "-DTZDIR=\"/system/usr/share/zoneinfo\"", |
Elliott Hughes | 0a610d0 | 2016-07-29 14:04:17 -0700 | [diff] [blame] | 157 | // Include `tzname`, `timezone`, and `daylight` globals. |
| 158 | "-DHAVE_POSIX_DECLS=0", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 159 | "-DUSG_COMPAT=1", |
Colin Cross | a35d23d | 2015-11-19 13:32:49 -0800 | [diff] [blame] | 160 | // Use the empty string (instead of " ") as the timezone abbreviation |
| 161 | // fallback. |
Colin Cross | 7b29495 | 2016-09-29 14:08:13 -0700 | [diff] [blame] | 162 | "-DWILDABBR=\"\"", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 163 | "-DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU", |
| 164 | "-Dlint", |
| 165 | ], |
| 166 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 167 | local_include_dirs: ["tzcode/"], |
| 168 | name: "libc_tzcode", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 169 | } |
| 170 | |
| 171 | // ======================================================== |
| 172 | // libc_dns.a - modified NetBSD DNS code |
| 173 | // ======================================================== |
| 174 | |
| 175 | cc_library_static { |
| 176 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 177 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 178 | srcs: [ |
Dan Willemsen | 9c9aa74 | 2016-01-15 16:00:57 -0800 | [diff] [blame] | 179 | "dns/**/*.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 180 | |
| 181 | "upstream-netbsd/lib/libc/isc/ev_streams.c", |
| 182 | "upstream-netbsd/lib/libc/isc/ev_timers.c", |
| 183 | "upstream-netbsd/lib/libc/resolv/mtctxres.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 184 | ], |
| 185 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 186 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 187 | "-DANDROID_CHANGES", |
| 188 | "-DINET6", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 189 | "-Wno-unused-parameter", |
| 190 | "-include netbsd-compat.h", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 191 | "-Wframe-larger-than=66000", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 192 | ], |
| 193 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 194 | local_include_dirs: [ |
| 195 | "dns/include", |
| 196 | "private", |
| 197 | "upstream-netbsd/lib/libc/include", |
| 198 | "upstream-netbsd/android/include", |
| 199 | ], |
| 200 | |
| 201 | name: "libc_dns", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 202 | } |
| 203 | |
| 204 | // ======================================================== |
| 205 | // libc_freebsd.a - upstream FreeBSD C library code |
| 206 | // ======================================================== |
| 207 | // |
| 208 | // These files are built with the freebsd-compat.h header file |
| 209 | // automatically included. |
| 210 | |
| 211 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 212 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 213 | srcs: [ |
| 214 | "upstream-freebsd/lib/libc/gen/ldexp.c", |
| 215 | "upstream-freebsd/lib/libc/gen/sleep.c", |
| 216 | "upstream-freebsd/lib/libc/gen/usleep.c", |
| 217 | "upstream-freebsd/lib/libc/stdlib/getopt_long.c", |
Elliott Hughes | 5702c6f | 2017-08-31 17:27:05 -0700 | [diff] [blame] | 218 | "upstream-freebsd/lib/libc/stdlib/hcreate.c", |
| 219 | "upstream-freebsd/lib/libc/stdlib/hcreate_r.c", |
| 220 | "upstream-freebsd/lib/libc/stdlib/hdestroy_r.c", |
| 221 | "upstream-freebsd/lib/libc/stdlib/hsearch_r.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 222 | "upstream-freebsd/lib/libc/stdlib/qsort.c", |
| 223 | "upstream-freebsd/lib/libc/stdlib/quick_exit.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 224 | "upstream-freebsd/lib/libc/string/wcpcpy.c", |
| 225 | "upstream-freebsd/lib/libc/string/wcpncpy.c", |
| 226 | "upstream-freebsd/lib/libc/string/wcscasecmp.c", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 227 | "upstream-freebsd/lib/libc/string/wcscat.c", |
| 228 | "upstream-freebsd/lib/libc/string/wcschr.c", |
| 229 | "upstream-freebsd/lib/libc/string/wcscmp.c", |
| 230 | "upstream-freebsd/lib/libc/string/wcscpy.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 231 | "upstream-freebsd/lib/libc/string/wcscspn.c", |
| 232 | "upstream-freebsd/lib/libc/string/wcsdup.c", |
| 233 | "upstream-freebsd/lib/libc/string/wcslcat.c", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 234 | "upstream-freebsd/lib/libc/string/wcslen.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 235 | "upstream-freebsd/lib/libc/string/wcsncasecmp.c", |
| 236 | "upstream-freebsd/lib/libc/string/wcsncat.c", |
| 237 | "upstream-freebsd/lib/libc/string/wcsncmp.c", |
| 238 | "upstream-freebsd/lib/libc/string/wcsncpy.c", |
| 239 | "upstream-freebsd/lib/libc/string/wcsnlen.c", |
| 240 | "upstream-freebsd/lib/libc/string/wcspbrk.c", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 241 | "upstream-freebsd/lib/libc/string/wcsrchr.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 242 | "upstream-freebsd/lib/libc/string/wcsspn.c", |
Elliott Hughes | 20f3399 | 2017-07-13 09:45:00 -0700 | [diff] [blame] | 243 | "upstream-freebsd/lib/libc/string/wcsstr.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 244 | "upstream-freebsd/lib/libc/string/wcstok.c", |
| 245 | "upstream-freebsd/lib/libc/string/wmemchr.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 246 | "upstream-freebsd/lib/libc/string/wmemcmp.c", |
Elliott Hughes | 20f3399 | 2017-07-13 09:45:00 -0700 | [diff] [blame] | 247 | "upstream-freebsd/lib/libc/string/wmemcpy.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 248 | "upstream-freebsd/lib/libc/string/wmemmove.c", |
Dan Willemsen | 9c9aa74 | 2016-01-15 16:00:57 -0800 | [diff] [blame] | 249 | "upstream-freebsd/lib/libc/string/wmemset.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 250 | ], |
| 251 | arch: { |
| 252 | arm64: { |
| 253 | exclude_srcs: [ |
| 254 | "upstream-freebsd/lib/libc/string/wmemmove.c", |
| 255 | ], |
| 256 | }, |
| 257 | x86: { |
| 258 | exclude_srcs: [ |
| 259 | "upstream-freebsd/lib/libc/string/wcschr.c", |
| 260 | "upstream-freebsd/lib/libc/string/wcscmp.c", |
| 261 | "upstream-freebsd/lib/libc/string/wcslen.c", |
| 262 | "upstream-freebsd/lib/libc/string/wcsrchr.c", |
| 263 | ], |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 264 | atom: { |
| 265 | exclude_srcs: [ |
| 266 | "upstream-freebsd/lib/libc/string/wmemcmp.c", |
| 267 | ], |
| 268 | }, |
| 269 | ssse3: { |
| 270 | exclude_srcs: [ |
| 271 | "upstream-freebsd/lib/libc/string/wcscat.c", |
| 272 | "upstream-freebsd/lib/libc/string/wcscpy.c", |
| 273 | ], |
| 274 | }, |
| 275 | sse4: { |
| 276 | exclude_srcs: [ |
| 277 | "upstream-freebsd/lib/libc/string/wmemcmp.c", |
| 278 | ], |
| 279 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 280 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 281 | }, |
| 282 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 283 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 284 | "-Wno-sign-compare", |
| 285 | "-Wno-uninitialized", |
Elliott Hughes | 5702c6f | 2017-08-31 17:27:05 -0700 | [diff] [blame] | 286 | "-Wno-unused-parameter", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 287 | "-include freebsd-compat.h", |
| 288 | ], |
| 289 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 290 | local_include_dirs: [ |
| 291 | "upstream-freebsd/android/include", |
| 292 | ], |
| 293 | |
| 294 | name: "libc_freebsd", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 295 | } |
| 296 | |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 297 | cc_library_static { |
| 298 | defaults: ["libc_defaults"], |
| 299 | srcs: [ |
Elliott Hughes | f1c568d | 2017-09-26 17:09:07 -0700 | [diff] [blame] | 300 | "upstream-freebsd/lib/libc/gen/glob.c", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 301 | "upstream-freebsd/lib/libc/stdlib/realpath.c", |
| 302 | ], |
| 303 | |
| 304 | cflags: [ |
| 305 | "-Wno-sign-compare", |
| 306 | "-include freebsd-compat.h", |
Elliott Hughes | f1c568d | 2017-09-26 17:09:07 -0700 | [diff] [blame] | 307 | "-Wframe-larger-than=66000", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 308 | ], |
| 309 | |
| 310 | local_include_dirs: [ |
| 311 | "upstream-freebsd/android/include", |
| 312 | ], |
| 313 | |
| 314 | name: "libc_freebsd_large_stack", |
| 315 | } |
| 316 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 317 | // ======================================================== |
| 318 | // libc_netbsd.a - upstream NetBSD C library code |
| 319 | // ======================================================== |
| 320 | // |
| 321 | // These files are built with the netbsd-compat.h header file |
| 322 | // automatically included. |
| 323 | |
| 324 | cc_library_static { |
| 325 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 326 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 327 | srcs: [ |
| 328 | "upstream-netbsd/common/lib/libc/stdlib/random.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 329 | "upstream-netbsd/lib/libc/gen/nice.c", |
| 330 | "upstream-netbsd/lib/libc/gen/popen.c", |
| 331 | "upstream-netbsd/lib/libc/gen/psignal.c", |
| 332 | "upstream-netbsd/lib/libc/gen/utime.c", |
| 333 | "upstream-netbsd/lib/libc/gen/utmp.c", |
| 334 | "upstream-netbsd/lib/libc/inet/nsap_addr.c", |
| 335 | "upstream-netbsd/lib/libc/regex/regcomp.c", |
| 336 | "upstream-netbsd/lib/libc/regex/regerror.c", |
| 337 | "upstream-netbsd/lib/libc/regex/regexec.c", |
| 338 | "upstream-netbsd/lib/libc/regex/regfree.c", |
| 339 | "upstream-netbsd/lib/libc/stdlib/bsearch.c", |
| 340 | "upstream-netbsd/lib/libc/stdlib/div.c", |
| 341 | "upstream-netbsd/lib/libc/stdlib/drand48.c", |
| 342 | "upstream-netbsd/lib/libc/stdlib/erand48.c", |
| 343 | "upstream-netbsd/lib/libc/stdlib/jrand48.c", |
| 344 | "upstream-netbsd/lib/libc/stdlib/lcong48.c", |
| 345 | "upstream-netbsd/lib/libc/stdlib/ldiv.c", |
| 346 | "upstream-netbsd/lib/libc/stdlib/lldiv.c", |
| 347 | "upstream-netbsd/lib/libc/stdlib/lrand48.c", |
| 348 | "upstream-netbsd/lib/libc/stdlib/mrand48.c", |
| 349 | "upstream-netbsd/lib/libc/stdlib/nrand48.c", |
| 350 | "upstream-netbsd/lib/libc/stdlib/_rand48.c", |
| 351 | "upstream-netbsd/lib/libc/stdlib/rand_r.c", |
| 352 | "upstream-netbsd/lib/libc/stdlib/reallocarr.c", |
| 353 | "upstream-netbsd/lib/libc/stdlib/seed48.c", |
| 354 | "upstream-netbsd/lib/libc/stdlib/srand48.c", |
| 355 | "upstream-netbsd/lib/libc/string/memccpy.c", |
| 356 | "upstream-netbsd/lib/libc/string/strcasestr.c", |
| 357 | "upstream-netbsd/lib/libc/string/strcoll.c", |
| 358 | "upstream-netbsd/lib/libc/string/strxfrm.c", |
| 359 | ], |
| 360 | multilib: { |
| 361 | lib32: { |
| 362 | // LP32 cruft |
| 363 | srcs: ["upstream-netbsd/common/lib/libc/hash/sha1/sha1.c"], |
| 364 | }, |
| 365 | }, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 366 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 367 | "-Wno-sign-compare", |
| 368 | "-Wno-uninitialized", |
Dan Willemsen | 879cec2 | 2016-02-29 10:37:56 -0800 | [diff] [blame] | 369 | "-Wno-unused-parameter", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 370 | "-DPOSIX_MISTAKE", |
| 371 | "-include netbsd-compat.h", |
| 372 | ], |
| 373 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 374 | local_include_dirs: [ |
| 375 | "upstream-netbsd/android/include", |
| 376 | "upstream-netbsd/lib/libc/include", |
| 377 | ], |
| 378 | |
| 379 | name: "libc_netbsd", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 380 | } |
| 381 | |
| 382 | // ======================================================== |
| 383 | // libc_openbsd_ndk.a - upstream OpenBSD C library code |
| 384 | // that can be safely included in the libc_ndk.a (doesn't |
| 385 | // contain any troublesome global data or constructors). |
| 386 | // ======================================================== |
| 387 | // |
| 388 | // These files are built with the openbsd-compat.h header file |
| 389 | // automatically included. |
| 390 | |
| 391 | cc_library_static { |
| 392 | name: "libc_openbsd_ndk", |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 393 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 394 | srcs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 395 | "upstream-openbsd/lib/libc/gen/alarm.c", |
| 396 | "upstream-openbsd/lib/libc/gen/ctype_.c", |
| 397 | "upstream-openbsd/lib/libc/gen/daemon.c", |
| 398 | "upstream-openbsd/lib/libc/gen/err.c", |
| 399 | "upstream-openbsd/lib/libc/gen/errx.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 400 | "upstream-openbsd/lib/libc/gen/fnmatch.c", |
| 401 | "upstream-openbsd/lib/libc/gen/ftok.c", |
| 402 | "upstream-openbsd/lib/libc/gen/getprogname.c", |
| 403 | "upstream-openbsd/lib/libc/gen/isctype.c", |
| 404 | "upstream-openbsd/lib/libc/gen/setprogname.c", |
| 405 | "upstream-openbsd/lib/libc/gen/time.c", |
| 406 | "upstream-openbsd/lib/libc/gen/tolower_.c", |
| 407 | "upstream-openbsd/lib/libc/gen/toupper_.c", |
| 408 | "upstream-openbsd/lib/libc/gen/verr.c", |
| 409 | "upstream-openbsd/lib/libc/gen/verrx.c", |
| 410 | "upstream-openbsd/lib/libc/gen/vwarn.c", |
| 411 | "upstream-openbsd/lib/libc/gen/vwarnx.c", |
| 412 | "upstream-openbsd/lib/libc/gen/warn.c", |
| 413 | "upstream-openbsd/lib/libc/gen/warnx.c", |
| 414 | "upstream-openbsd/lib/libc/locale/btowc.c", |
| 415 | "upstream-openbsd/lib/libc/locale/mbrlen.c", |
| 416 | "upstream-openbsd/lib/libc/locale/mbstowcs.c", |
| 417 | "upstream-openbsd/lib/libc/locale/mbtowc.c", |
| 418 | "upstream-openbsd/lib/libc/locale/wcscoll.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 419 | "upstream-openbsd/lib/libc/locale/wcstoimax.c", |
| 420 | "upstream-openbsd/lib/libc/locale/wcstol.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 421 | "upstream-openbsd/lib/libc/locale/wcstoll.c", |
| 422 | "upstream-openbsd/lib/libc/locale/wcstombs.c", |
| 423 | "upstream-openbsd/lib/libc/locale/wcstoul.c", |
| 424 | "upstream-openbsd/lib/libc/locale/wcstoull.c", |
| 425 | "upstream-openbsd/lib/libc/locale/wcstoumax.c", |
| 426 | "upstream-openbsd/lib/libc/locale/wcsxfrm.c", |
| 427 | "upstream-openbsd/lib/libc/locale/wctob.c", |
| 428 | "upstream-openbsd/lib/libc/locale/wctomb.c", |
Elliott Hughes | 26fda77 | 2016-04-06 11:56:41 -0700 | [diff] [blame] | 429 | "upstream-openbsd/lib/libc/net/base64.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 430 | "upstream-openbsd/lib/libc/net/htonl.c", |
| 431 | "upstream-openbsd/lib/libc/net/htons.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 432 | "upstream-openbsd/lib/libc/net/inet_lnaof.c", |
| 433 | "upstream-openbsd/lib/libc/net/inet_makeaddr.c", |
| 434 | "upstream-openbsd/lib/libc/net/inet_netof.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 435 | "upstream-openbsd/lib/libc/net/inet_ntoa.c", |
| 436 | "upstream-openbsd/lib/libc/net/inet_ntop.c", |
| 437 | "upstream-openbsd/lib/libc/net/inet_pton.c", |
| 438 | "upstream-openbsd/lib/libc/net/ntohl.c", |
| 439 | "upstream-openbsd/lib/libc/net/ntohs.c", |
Colin Cross | 8ce38af | 2016-01-19 12:50:20 -0800 | [diff] [blame] | 440 | "upstream-openbsd/lib/libc/net/res_random.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 441 | "upstream-openbsd/lib/libc/stdio/fgetln.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 442 | "upstream-openbsd/lib/libc/stdio/fgetwc.c", |
| 443 | "upstream-openbsd/lib/libc/stdio/fgetws.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 444 | "upstream-openbsd/lib/libc/stdio/flags.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 445 | "upstream-openbsd/lib/libc/stdio/fpurge.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 446 | "upstream-openbsd/lib/libc/stdio/fputwc.c", |
| 447 | "upstream-openbsd/lib/libc/stdio/fputws.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 448 | "upstream-openbsd/lib/libc/stdio/fvwrite.c", |
| 449 | "upstream-openbsd/lib/libc/stdio/fwalk.c", |
| 450 | "upstream-openbsd/lib/libc/stdio/fwide.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 451 | "upstream-openbsd/lib/libc/stdio/getdelim.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 452 | "upstream-openbsd/lib/libc/stdio/gets.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 453 | "upstream-openbsd/lib/libc/stdio/makebuf.c", |
| 454 | "upstream-openbsd/lib/libc/stdio/mktemp.c", |
| 455 | "upstream-openbsd/lib/libc/stdio/open_memstream.c", |
| 456 | "upstream-openbsd/lib/libc/stdio/open_wmemstream.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 457 | "upstream-openbsd/lib/libc/stdio/rget.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 458 | "upstream-openbsd/lib/libc/stdio/setvbuf.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 459 | "upstream-openbsd/lib/libc/stdio/tempnam.c", |
| 460 | "upstream-openbsd/lib/libc/stdio/tmpnam.c", |
| 461 | "upstream-openbsd/lib/libc/stdio/ungetc.c", |
| 462 | "upstream-openbsd/lib/libc/stdio/ungetwc.c", |
| 463 | "upstream-openbsd/lib/libc/stdio/vasprintf.c", |
| 464 | "upstream-openbsd/lib/libc/stdio/vdprintf.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 465 | "upstream-openbsd/lib/libc/stdio/vsscanf.c", |
| 466 | "upstream-openbsd/lib/libc/stdio/vswprintf.c", |
| 467 | "upstream-openbsd/lib/libc/stdio/vswscanf.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 468 | "upstream-openbsd/lib/libc/stdio/wbuf.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 469 | "upstream-openbsd/lib/libc/stdio/wsetup.c", |
| 470 | "upstream-openbsd/lib/libc/stdlib/abs.c", |
| 471 | "upstream-openbsd/lib/libc/stdlib/atoi.c", |
| 472 | "upstream-openbsd/lib/libc/stdlib/atol.c", |
| 473 | "upstream-openbsd/lib/libc/stdlib/atoll.c", |
| 474 | "upstream-openbsd/lib/libc/stdlib/getenv.c", |
Colin Cross | b839610 | 2016-04-07 13:24:50 -0700 | [diff] [blame] | 475 | "upstream-openbsd/lib/libc/stdlib/getsubopt.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 476 | "upstream-openbsd/lib/libc/stdlib/insque.c", |
| 477 | "upstream-openbsd/lib/libc/stdlib/imaxabs.c", |
| 478 | "upstream-openbsd/lib/libc/stdlib/imaxdiv.c", |
| 479 | "upstream-openbsd/lib/libc/stdlib/labs.c", |
| 480 | "upstream-openbsd/lib/libc/stdlib/llabs.c", |
| 481 | "upstream-openbsd/lib/libc/stdlib/lsearch.c", |
| 482 | "upstream-openbsd/lib/libc/stdlib/reallocarray.c", |
| 483 | "upstream-openbsd/lib/libc/stdlib/remque.c", |
| 484 | "upstream-openbsd/lib/libc/stdlib/setenv.c", |
| 485 | "upstream-openbsd/lib/libc/stdlib/strtoimax.c", |
| 486 | "upstream-openbsd/lib/libc/stdlib/strtol.c", |
| 487 | "upstream-openbsd/lib/libc/stdlib/strtoll.c", |
| 488 | "upstream-openbsd/lib/libc/stdlib/strtoul.c", |
| 489 | "upstream-openbsd/lib/libc/stdlib/strtoull.c", |
| 490 | "upstream-openbsd/lib/libc/stdlib/strtoumax.c", |
| 491 | "upstream-openbsd/lib/libc/stdlib/system.c", |
| 492 | "upstream-openbsd/lib/libc/stdlib/tfind.c", |
| 493 | "upstream-openbsd/lib/libc/stdlib/tsearch.c", |
| 494 | "upstream-openbsd/lib/libc/string/strcasecmp.c", |
| 495 | "upstream-openbsd/lib/libc/string/strcspn.c", |
| 496 | "upstream-openbsd/lib/libc/string/strdup.c", |
| 497 | "upstream-openbsd/lib/libc/string/strndup.c", |
| 498 | "upstream-openbsd/lib/libc/string/strpbrk.c", |
| 499 | "upstream-openbsd/lib/libc/string/strsep.c", |
| 500 | "upstream-openbsd/lib/libc/string/strspn.c", |
| 501 | "upstream-openbsd/lib/libc/string/strstr.c", |
| 502 | "upstream-openbsd/lib/libc/string/strtok.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 503 | "upstream-openbsd/lib/libc/string/wcslcpy.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 504 | "upstream-openbsd/lib/libc/string/wcswidth.c", |
| 505 | ], |
| 506 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 507 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 508 | "-Wno-sign-compare", |
| 509 | "-Wno-uninitialized", |
| 510 | "-Wno-unused-parameter", |
| 511 | "-include openbsd-compat.h", |
| 512 | ], |
| 513 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 514 | local_include_dirs: [ |
| 515 | "private", |
| 516 | "stdio", |
| 517 | "upstream-openbsd/android/include", |
| 518 | "upstream-openbsd/lib/libc/include", |
| 519 | "upstream-openbsd/lib/libc/gdtoa/", |
| 520 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 521 | } |
| 522 | |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 523 | cc_library_static { |
| 524 | name: "libc_openbsd_large_stack", |
| 525 | defaults: ["libc_defaults"], |
| 526 | srcs: [ |
Elliott Hughes | 2f9c8ce | 2017-11-01 13:54:47 -0700 | [diff] [blame] | 527 | "stdio/vfprintf.cpp", |
| 528 | "stdio/vfwprintf.cpp", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 529 | ], |
| 530 | cflags: [ |
| 531 | "-include openbsd-compat.h", |
| 532 | "-Wno-sign-compare", |
| 533 | "-Wframe-larger-than=5000", |
| 534 | ], |
| 535 | |
| 536 | local_include_dirs: [ |
Elliott Hughes | 3a589c2 | 2017-10-30 11:43:58 -0700 | [diff] [blame] | 537 | "upstream-openbsd/android/include/", |
| 538 | "upstream-openbsd/lib/libc/include/", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 539 | "upstream-openbsd/lib/libc/gdtoa/", |
Elliott Hughes | 3a589c2 | 2017-10-30 11:43:58 -0700 | [diff] [blame] | 540 | "upstream-openbsd/lib/libc/stdio/", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 541 | ], |
| 542 | } |
| 543 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 544 | // ======================================================== |
| 545 | // libc_openbsd.a - upstream OpenBSD C library code |
| 546 | // ======================================================== |
| 547 | // |
| 548 | // These files are built with the openbsd-compat.h header file |
| 549 | // automatically included. |
| 550 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 551 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 552 | srcs: [ |
Dan Willemsen | 35e91a1 | 2015-09-17 15:28:45 -0700 | [diff] [blame] | 553 | // These two depend on getentropy_linux.c, which isn't in libc_ndk.a. |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 554 | "upstream-openbsd/lib/libc/crypt/arc4random.c", |
| 555 | "upstream-openbsd/lib/libc/crypt/arc4random_uniform.c", |
| 556 | |
| 557 | // May be overriden by per-arch optimized versions |
| 558 | "upstream-openbsd/lib/libc/string/memchr.c", |
| 559 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 560 | "upstream-openbsd/lib/libc/string/memrchr.c", |
| 561 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 562 | "upstream-openbsd/lib/libc/string/stpncpy.c", |
| 563 | "upstream-openbsd/lib/libc/string/strcat.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 564 | "upstream-openbsd/lib/libc/string/strcpy.c", |
| 565 | "upstream-openbsd/lib/libc/string/strlcat.c", |
| 566 | "upstream-openbsd/lib/libc/string/strlcpy.c", |
| 567 | "upstream-openbsd/lib/libc/string/strncat.c", |
| 568 | "upstream-openbsd/lib/libc/string/strncmp.c", |
| 569 | "upstream-openbsd/lib/libc/string/strncpy.c", |
| 570 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 571 | |
| 572 | arch: { |
| 573 | arm: { |
| 574 | exclude_srcs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 575 | "upstream-openbsd/lib/libc/string/strcpy.c", |
| 576 | ], |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 577 | cortex_a7: { |
| 578 | exclude_srcs: [ |
| 579 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 580 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 581 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 582 | ], |
| 583 | }, |
| 584 | cortex_a53: { |
| 585 | exclude_srcs: [ |
| 586 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 587 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 588 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 589 | ], |
| 590 | }, |
| 591 | cortex_a53_a57: { |
| 592 | exclude_srcs: [ |
| 593 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 594 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 595 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 596 | ], |
| 597 | }, |
| 598 | cortex_a8: { |
| 599 | exclude_srcs: [ |
| 600 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 601 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 602 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 603 | ], |
| 604 | }, |
| 605 | cortex_a9: { |
| 606 | exclude_srcs: [ |
| 607 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 608 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 609 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 610 | ], |
| 611 | }, |
| 612 | cortex_a15: { |
| 613 | exclude_srcs: [ |
| 614 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 615 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 616 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 617 | ], |
| 618 | }, |
Christopher Ferris | 94bd274 | 2017-05-08 12:09:03 -0700 | [diff] [blame] | 619 | cortex_a73: { |
| 620 | exclude_srcs: [ |
| 621 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 622 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 623 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 624 | ], |
| 625 | }, |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 626 | denver: { |
| 627 | exclude_srcs: [ |
| 628 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 629 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 630 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 631 | ], |
| 632 | }, |
| 633 | krait: { |
| 634 | exclude_srcs: [ |
| 635 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 636 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 637 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 638 | ], |
| 639 | }, |
Christopher Ferris | 950a958 | 2017-03-29 13:10:56 -0700 | [diff] [blame] | 640 | kryo: { |
| 641 | exclude_srcs: [ |
| 642 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 643 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 644 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 645 | ], |
| 646 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 647 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 648 | arm64: { |
| 649 | exclude_srcs: [ |
| 650 | "upstream-openbsd/lib/libc/string/memchr.c", |
| 651 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 652 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 653 | "upstream-openbsd/lib/libc/string/strcpy.c", |
| 654 | "upstream-openbsd/lib/libc/string/strncmp.c", |
| 655 | ], |
| 656 | }, |
Prashant Patil | fcb877a | 2017-03-16 18:07:00 +0530 | [diff] [blame] | 657 | mips: { |
| 658 | exclude_srcs: [ |
| 659 | "upstream-openbsd/lib/libc/string/memchr.c", |
| 660 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 661 | "upstream-openbsd/lib/libc/string/strcpy.c", |
| 662 | "upstream-openbsd/lib/libc/string/strncmp.c", |
| 663 | ], |
| 664 | }, |
| 665 | mips64: { |
| 666 | exclude_srcs: [ |
| 667 | "upstream-openbsd/lib/libc/string/memchr.c", |
| 668 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 669 | "upstream-openbsd/lib/libc/string/strcpy.c", |
| 670 | "upstream-openbsd/lib/libc/string/strncmp.c", |
| 671 | ], |
| 672 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 673 | x86: { |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 674 | exclude_srcs: [ |
| 675 | "upstream-openbsd/lib/libc/string/memchr.c", |
| 676 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 677 | "upstream-openbsd/lib/libc/string/memrchr.c", |
| 678 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 679 | "upstream-openbsd/lib/libc/string/stpncpy.c", |
| 680 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 681 | "upstream-openbsd/lib/libc/string/strcpy.c", |
| 682 | "upstream-openbsd/lib/libc/string/strncmp.c", |
| 683 | "upstream-openbsd/lib/libc/string/strncpy.c", |
| 684 | ], |
| 685 | ssse3: { |
| 686 | exclude_srcs: [ |
| 687 | "upstream-openbsd/lib/libc/string/strlcat.c", |
| 688 | "upstream-openbsd/lib/libc/string/strlcpy.c", |
| 689 | "upstream-openbsd/lib/libc/string/strncat.c", |
| 690 | ], |
| 691 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 692 | }, |
| 693 | |
| 694 | x86_64: { |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 695 | exclude_srcs: [ |
| 696 | "upstream-openbsd/lib/libc/string/memmove.c", |
| 697 | "upstream-openbsd/lib/libc/string/stpcpy.c", |
| 698 | "upstream-openbsd/lib/libc/string/stpncpy.c", |
| 699 | "upstream-openbsd/lib/libc/string/strcat.c", |
| 700 | "upstream-openbsd/lib/libc/string/strcpy.c", |
| 701 | "upstream-openbsd/lib/libc/string/strlcat.c", |
| 702 | "upstream-openbsd/lib/libc/string/strlcpy.c", |
| 703 | "upstream-openbsd/lib/libc/string/strncat.c", |
| 704 | "upstream-openbsd/lib/libc/string/strncmp.c", |
| 705 | "upstream-openbsd/lib/libc/string/strncpy.c", |
| 706 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 707 | }, |
| 708 | }, |
| 709 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 710 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 711 | "-Wno-sign-compare", |
| 712 | "-Wno-uninitialized", |
| 713 | "-Wno-unused-parameter", |
| 714 | "-include openbsd-compat.h", |
| 715 | ], |
| 716 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 717 | local_include_dirs: [ |
| 718 | "private", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 719 | "upstream-openbsd/android/include", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 720 | ], |
| 721 | |
| 722 | name: "libc_openbsd", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 723 | } |
| 724 | |
| 725 | // ======================================================== |
| 726 | // libc_gdtoa.a - upstream OpenBSD C library gdtoa code |
| 727 | // ======================================================== |
| 728 | // |
| 729 | // These files are built with the openbsd-compat.h header file |
| 730 | // automatically included. |
| 731 | |
| 732 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 733 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 734 | srcs: [ |
| 735 | "upstream-openbsd/android/gdtoa_support.cpp", |
| 736 | "upstream-openbsd/lib/libc/gdtoa/dmisc.c", |
| 737 | "upstream-openbsd/lib/libc/gdtoa/dtoa.c", |
| 738 | "upstream-openbsd/lib/libc/gdtoa/gdtoa.c", |
| 739 | "upstream-openbsd/lib/libc/gdtoa/gethex.c", |
| 740 | "upstream-openbsd/lib/libc/gdtoa/gmisc.c", |
| 741 | "upstream-openbsd/lib/libc/gdtoa/hd_init.c", |
| 742 | "upstream-openbsd/lib/libc/gdtoa/hdtoa.c", |
| 743 | "upstream-openbsd/lib/libc/gdtoa/hexnan.c", |
| 744 | "upstream-openbsd/lib/libc/gdtoa/ldtoa.c", |
| 745 | "upstream-openbsd/lib/libc/gdtoa/misc.c", |
| 746 | "upstream-openbsd/lib/libc/gdtoa/smisc.c", |
| 747 | "upstream-openbsd/lib/libc/gdtoa/strtod.c", |
| 748 | "upstream-openbsd/lib/libc/gdtoa/strtodg.c", |
| 749 | "upstream-openbsd/lib/libc/gdtoa/strtof.c", |
| 750 | "upstream-openbsd/lib/libc/gdtoa/strtord.c", |
| 751 | "upstream-openbsd/lib/libc/gdtoa/sum.c", |
| 752 | "upstream-openbsd/lib/libc/gdtoa/ulp.c", |
| 753 | ], |
| 754 | multilib: { |
| 755 | lib64: { |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 756 | srcs: ["upstream-openbsd/lib/libc/gdtoa/strtorQ.c"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 757 | }, |
| 758 | }, |
| 759 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 760 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 761 | "-Wno-sign-compare", |
| 762 | "-Wno-uninitialized", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 763 | "-include openbsd-compat.h", |
| 764 | ], |
| 765 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 766 | local_include_dirs: [ |
| 767 | "private", |
| 768 | "upstream-openbsd/android/include", |
| 769 | "upstream-openbsd/lib/libc/include", |
| 770 | ], |
| 771 | |
| 772 | name: "libc_gdtoa", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 773 | } |
| 774 | |
| 775 | // ======================================================== |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 776 | // libc_fortify.a - container for our FORITFY |
| 777 | // implementation details |
| 778 | // ======================================================== |
| 779 | cc_library_static { |
| 780 | defaults: ["libc_defaults"], |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 781 | srcs: ["bionic/fortify.cpp"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 782 | |
| 783 | name: "libc_fortify", |
| 784 | |
| 785 | // Disable FORTIFY for the compilation of these, so we don't end up having |
| 786 | // FORTIFY silently call itself. |
George Burgess IV | b97049c | 2017-07-24 15:05:05 -0700 | [diff] [blame] | 787 | cflags: ["-U_FORTIFY_SOURCE", "-D__BIONIC_DECLARE_FORTIFY_HELPERS"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 788 | |
| 789 | arch: { |
| 790 | arm: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 791 | cflags: ["-DNO___MEMCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 792 | srcs: [ |
| 793 | "arch-arm/generic/bionic/__memcpy_chk.S", |
| 794 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 795 | cortex_a7: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 796 | cflags: ["-DNO___STRCAT_CHK", "-DNO___STRCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 797 | srcs: [ |
| 798 | "arch-arm/cortex-a7/bionic/__strcat_chk.S", |
| 799 | "arch-arm/cortex-a7/bionic/__strcpy_chk.S", |
| 800 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 801 | }, |
| 802 | cortex_a53: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 803 | cflags: ["-DNO___STRCAT_CHK", "-DNO___STRCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 804 | srcs: [ |
| 805 | "arch-arm/cortex-a53/bionic/__strcat_chk.S", |
| 806 | "arch-arm/cortex-a53/bionic/__strcpy_chk.S", |
| 807 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 808 | }, |
| 809 | cortex_a53_a57: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 810 | cflags: ["-DNO___STRCAT_CHK", "-DNO___STRCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 811 | srcs: [ |
| 812 | "arch-arm/cortex-a15/bionic/__strcat_chk.S", |
| 813 | "arch-arm/cortex-a15/bionic/__strcpy_chk.S", |
| 814 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 815 | }, |
| 816 | cortex_a8: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 817 | cflags: ["-DNO___STRCAT_CHK", "-DNO___STRCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 818 | srcs: [ |
| 819 | "arch-arm/cortex-a15/bionic/__strcat_chk.S", |
| 820 | "arch-arm/cortex-a15/bionic/__strcpy_chk.S", |
| 821 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 822 | }, |
| 823 | cortex_a9: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 824 | cflags: ["-DNO___STRCAT_CHK", "-DNO___STRCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 825 | srcs: [ |
| 826 | "arch-arm/cortex-a9/bionic/__strcat_chk.S", |
| 827 | "arch-arm/cortex-a9/bionic/__strcpy_chk.S", |
| 828 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 829 | }, |
| 830 | cortex_a15: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 831 | cflags: ["-DNO___STRCAT_CHK", "-DNO___STRCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 832 | srcs: [ |
| 833 | "arch-arm/cortex-a15/bionic/__strcat_chk.S", |
| 834 | "arch-arm/cortex-a15/bionic/__strcpy_chk.S", |
| 835 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 836 | }, |
| 837 | cortex_a73: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 838 | cflags: ["-DNO___STRCAT_CHK", "-DNO___STRCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 839 | srcs: [ |
| 840 | "arch-arm/denver/bionic/__strcat_chk.S", |
| 841 | "arch-arm/denver/bionic/__strcpy_chk.S", |
| 842 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 843 | }, |
| 844 | denver: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 845 | cflags: ["-DNO___STRCAT_CHK", "-DNO___STRCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 846 | srcs: [ |
| 847 | "arch-arm/denver/bionic/__strcat_chk.S", |
| 848 | "arch-arm/denver/bionic/__strcpy_chk.S", |
| 849 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 850 | }, |
| 851 | krait: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 852 | cflags: ["-DNO___STRCAT_CHK", "-DNO___STRCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 853 | srcs: [ |
| 854 | "arch-arm/krait/bionic/__strcat_chk.S", |
| 855 | "arch-arm/krait/bionic/__strcpy_chk.S", |
| 856 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 857 | }, |
| 858 | kryo: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 859 | cflags: ["-DNO___STRCAT_CHK", "-DNO___STRCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 860 | srcs: [ |
| 861 | "arch-arm/krait/bionic/__strcat_chk.S", |
| 862 | "arch-arm/krait/bionic/__strcpy_chk.S", |
| 863 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 864 | }, |
| 865 | }, |
| 866 | arm64: { |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 867 | cflags: ["-DNO___MEMCPY_CHK"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 868 | srcs: [ |
| 869 | "arch-arm64/generic/bionic/__memcpy_chk.S", |
| 870 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 871 | }, |
| 872 | }, |
| 873 | } |
| 874 | |
| 875 | // ======================================================== |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 876 | // libc_bionic.a - home-grown C library code |
| 877 | // ======================================================== |
| 878 | |
| 879 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 880 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 881 | srcs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 882 | // The data that backs getauxval is initialized in the libc init |
| 883 | // functions which are invoked by the linker. If this file is included |
| 884 | // in libc_ndk.a, only one of the copies of the global data will be |
| 885 | // initialized, resulting in nullptr dereferences. |
| 886 | "bionic/getauxval.cpp", |
| 887 | |
Dan Willemsen | 35e91a1 | 2015-09-17 15:28:45 -0700 | [diff] [blame] | 888 | // These four require getauxval, which isn't available on older |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 889 | // platforms. |
| 890 | "bionic/getentropy_linux.c", |
| 891 | "bionic/sysconf.cpp", |
| 892 | "bionic/vdso.cpp", |
Dan Willemsen | 35e91a1 | 2015-09-17 15:28:45 -0700 | [diff] [blame] | 893 | "bionic/setjmp_cookie.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 894 | |
Josh Gao | 10ec928 | 2017-04-03 15:13:29 -0700 | [diff] [blame] | 895 | // The following must not be statically linked into libc_ndk.a, because |
| 896 | // debuggerd will look for the abort message in libc.so's copy. |
| 897 | "bionic/android_set_abort_message.cpp", |
| 898 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 899 | "bionic/strchr.cpp", |
| 900 | "bionic/strnlen.c", |
| 901 | "bionic/strrchr.cpp", |
| 902 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 903 | |
| 904 | arch: { |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 905 | arm: { |
| 906 | srcs: [ |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 907 | "arch-arm/generic/bionic/memcmp.S", |
| 908 | "arch-arm/generic/bionic/memcpy.S", |
| 909 | "arch-arm/generic/bionic/memset.S", |
| 910 | "arch-arm/generic/bionic/strcmp.S", |
| 911 | "arch-arm/generic/bionic/strcpy.S", |
| 912 | "arch-arm/generic/bionic/strlen.c", |
| 913 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 914 | "arch-arm/bionic/atomics_arm.c", |
| 915 | "arch-arm/bionic/__bionic_clone.S", |
| 916 | "arch-arm/bionic/_exit_with_stack_teardown.S", |
| 917 | "arch-arm/bionic/libgcc_compat.c", |
| 918 | "arch-arm/bionic/popcount_tab.c", |
| 919 | "arch-arm/bionic/__restore.S", |
| 920 | "arch-arm/bionic/setjmp.S", |
| 921 | "arch-arm/bionic/syscall.S", |
| 922 | "arch-arm/bionic/vfork.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 923 | ], |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 924 | cortex_a7: { |
| 925 | srcs: [ |
| 926 | "arch-arm/cortex-a7/bionic/memset.S", |
Christopher Ferris | ecebb49 | 2016-11-28 11:09:49 -0800 | [diff] [blame] | 927 | "arch-arm/cortex-a7/bionic/memcpy.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 928 | |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 929 | "arch-arm/cortex-a15/bionic/stpcpy.S", |
| 930 | "arch-arm/cortex-a15/bionic/strcat.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 931 | "arch-arm/cortex-a15/bionic/strcmp.S", |
| 932 | "arch-arm/cortex-a15/bionic/strcpy.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 933 | "arch-arm/cortex-a15/bionic/strlen.S", |
| 934 | |
| 935 | "arch-arm/denver/bionic/memmove.S", |
| 936 | ], |
| 937 | exclude_srcs: [ |
| 938 | "arch-arm/generic/bionic/memcpy.S", |
| 939 | "arch-arm/generic/bionic/memset.S", |
| 940 | "arch-arm/generic/bionic/strcmp.S", |
| 941 | "arch-arm/generic/bionic/strcpy.S", |
| 942 | "arch-arm/generic/bionic/strlen.c", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 943 | ], |
| 944 | }, |
| 945 | cortex_a53: { |
| 946 | srcs: [ |
| 947 | "arch-arm/cortex-a53/bionic/memcpy.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 948 | |
| 949 | "arch-arm/cortex-a7/bionic/memset.S", |
| 950 | |
| 951 | "arch-arm/cortex-a15/bionic/stpcpy.S", |
| 952 | "arch-arm/cortex-a15/bionic/strcat.S", |
| 953 | "arch-arm/cortex-a15/bionic/strcmp.S", |
| 954 | "arch-arm/cortex-a15/bionic/strcpy.S", |
| 955 | "arch-arm/cortex-a15/bionic/strlen.S", |
| 956 | |
| 957 | "arch-arm/denver/bionic/memmove.S", |
| 958 | ], |
| 959 | exclude_srcs: [ |
| 960 | "arch-arm/generic/bionic/memcpy.S", |
| 961 | "arch-arm/generic/bionic/memset.S", |
| 962 | "arch-arm/generic/bionic/strcmp.S", |
| 963 | "arch-arm/generic/bionic/strcpy.S", |
| 964 | "arch-arm/generic/bionic/strlen.c", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 965 | ], |
| 966 | }, |
| 967 | cortex_a53_a57: { |
| 968 | srcs: [ |
| 969 | "arch-arm/cortex-a15/bionic/memcpy.S", |
| 970 | "arch-arm/cortex-a15/bionic/memset.S", |
| 971 | "arch-arm/cortex-a15/bionic/stpcpy.S", |
| 972 | "arch-arm/cortex-a15/bionic/strcat.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 973 | "arch-arm/cortex-a15/bionic/strcmp.S", |
| 974 | "arch-arm/cortex-a15/bionic/strcpy.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 975 | "arch-arm/cortex-a15/bionic/strlen.S", |
| 976 | |
| 977 | "arch-arm/denver/bionic/memmove.S", |
| 978 | ], |
| 979 | exclude_srcs: [ |
| 980 | "arch-arm/generic/bionic/memcpy.S", |
| 981 | "arch-arm/generic/bionic/memset.S", |
| 982 | "arch-arm/generic/bionic/strcmp.S", |
| 983 | "arch-arm/generic/bionic/strcpy.S", |
| 984 | "arch-arm/generic/bionic/strlen.c", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 985 | ], |
| 986 | }, |
| 987 | cortex_a8: { |
| 988 | srcs: [ |
| 989 | "arch-arm/cortex-a15/bionic/memcpy.S", |
| 990 | "arch-arm/cortex-a15/bionic/memset.S", |
| 991 | "arch-arm/cortex-a15/bionic/stpcpy.S", |
| 992 | "arch-arm/cortex-a15/bionic/strcat.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 993 | "arch-arm/cortex-a15/bionic/strcmp.S", |
| 994 | "arch-arm/cortex-a15/bionic/strcpy.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 995 | "arch-arm/cortex-a15/bionic/strlen.S", |
| 996 | |
| 997 | "arch-arm/denver/bionic/memmove.S", |
| 998 | ], |
| 999 | exclude_srcs: [ |
| 1000 | "arch-arm/generic/bionic/memcpy.S", |
| 1001 | "arch-arm/generic/bionic/memset.S", |
| 1002 | "arch-arm/generic/bionic/strcmp.S", |
| 1003 | "arch-arm/generic/bionic/strcpy.S", |
| 1004 | "arch-arm/generic/bionic/strlen.c", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1005 | ], |
| 1006 | }, |
| 1007 | cortex_a9: { |
| 1008 | srcs: [ |
| 1009 | "arch-arm/cortex-a9/bionic/memcpy.S", |
| 1010 | "arch-arm/cortex-a9/bionic/memset.S", |
| 1011 | "arch-arm/cortex-a9/bionic/stpcpy.S", |
| 1012 | "arch-arm/cortex-a9/bionic/strcat.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1013 | "arch-arm/cortex-a9/bionic/strcmp.S", |
| 1014 | "arch-arm/cortex-a9/bionic/strcpy.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1015 | "arch-arm/cortex-a9/bionic/strlen.S", |
| 1016 | |
| 1017 | "arch-arm/denver/bionic/memmove.S", |
| 1018 | ], |
| 1019 | exclude_srcs: [ |
| 1020 | "arch-arm/generic/bionic/memcpy.S", |
| 1021 | "arch-arm/generic/bionic/memset.S", |
| 1022 | "arch-arm/generic/bionic/strcmp.S", |
| 1023 | "arch-arm/generic/bionic/strcpy.S", |
| 1024 | "arch-arm/generic/bionic/strlen.c", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1025 | ], |
| 1026 | }, |
| 1027 | cortex_a15: { |
| 1028 | srcs: [ |
| 1029 | "arch-arm/cortex-a15/bionic/memcpy.S", |
| 1030 | "arch-arm/cortex-a15/bionic/memset.S", |
| 1031 | "arch-arm/cortex-a15/bionic/stpcpy.S", |
| 1032 | "arch-arm/cortex-a15/bionic/strcat.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1033 | "arch-arm/cortex-a15/bionic/strcmp.S", |
| 1034 | "arch-arm/cortex-a15/bionic/strcpy.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1035 | "arch-arm/cortex-a15/bionic/strlen.S", |
| 1036 | |
| 1037 | "arch-arm/denver/bionic/memmove.S", |
| 1038 | ], |
| 1039 | exclude_srcs: [ |
| 1040 | "arch-arm/generic/bionic/memcpy.S", |
| 1041 | "arch-arm/generic/bionic/memset.S", |
| 1042 | "arch-arm/generic/bionic/strcmp.S", |
| 1043 | "arch-arm/generic/bionic/strcpy.S", |
| 1044 | "arch-arm/generic/bionic/strlen.c", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1045 | ], |
| 1046 | }, |
Christopher Ferris | 94bd274 | 2017-05-08 12:09:03 -0700 | [diff] [blame] | 1047 | cortex_a73: { |
| 1048 | srcs: [ |
| 1049 | "arch-arm/cortex-a7/bionic/memset.S", |
| 1050 | |
| 1051 | "arch-arm/denver/bionic/memcpy.S", |
| 1052 | "arch-arm/denver/bionic/memmove.S", |
Christopher Ferris | 94bd274 | 2017-05-08 12:09:03 -0700 | [diff] [blame] | 1053 | |
| 1054 | "arch-arm/krait/bionic/strcmp.S", |
| 1055 | |
| 1056 | "arch-arm/cortex-a15/bionic/stpcpy.S", |
| 1057 | "arch-arm/cortex-a15/bionic/strcat.S", |
| 1058 | "arch-arm/cortex-a15/bionic/strcpy.S", |
| 1059 | "arch-arm/cortex-a15/bionic/strlen.S", |
| 1060 | ], |
| 1061 | exclude_srcs: [ |
| 1062 | "arch-arm/generic/bionic/memcpy.S", |
| 1063 | "arch-arm/generic/bionic/memset.S", |
| 1064 | "arch-arm/generic/bionic/strcmp.S", |
| 1065 | "arch-arm/generic/bionic/strcpy.S", |
| 1066 | "arch-arm/generic/bionic/strlen.c", |
Christopher Ferris | 94bd274 | 2017-05-08 12:09:03 -0700 | [diff] [blame] | 1067 | ], |
| 1068 | }, |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1069 | denver: { |
| 1070 | srcs: [ |
| 1071 | "arch-arm/denver/bionic/memcpy.S", |
| 1072 | "arch-arm/denver/bionic/memmove.S", |
| 1073 | "arch-arm/denver/bionic/memset.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1074 | |
| 1075 | // Use cortex-a15 versions of strcat/strcpy/strlen. |
| 1076 | "arch-arm/cortex-a15/bionic/stpcpy.S", |
| 1077 | "arch-arm/cortex-a15/bionic/strcat.S", |
| 1078 | "arch-arm/cortex-a15/bionic/strcmp.S", |
| 1079 | "arch-arm/cortex-a15/bionic/strcpy.S", |
| 1080 | "arch-arm/cortex-a15/bionic/strlen.S", |
| 1081 | ], |
| 1082 | exclude_srcs: [ |
| 1083 | "arch-arm/generic/bionic/memcpy.S", |
| 1084 | "arch-arm/generic/bionic/memset.S", |
| 1085 | "arch-arm/generic/bionic/strcmp.S", |
| 1086 | "arch-arm/generic/bionic/strcpy.S", |
| 1087 | "arch-arm/generic/bionic/strlen.c", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1088 | ], |
| 1089 | }, |
| 1090 | krait: { |
| 1091 | srcs: [ |
| 1092 | "arch-arm/krait/bionic/memcpy.S", |
| 1093 | "arch-arm/krait/bionic/memset.S", |
| 1094 | "arch-arm/krait/bionic/strcmp.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1095 | |
| 1096 | // Use cortex-a15 versions of strcat/strcpy/strlen. |
| 1097 | "arch-arm/cortex-a15/bionic/stpcpy.S", |
| 1098 | "arch-arm/cortex-a15/bionic/strcat.S", |
| 1099 | "arch-arm/cortex-a15/bionic/strcpy.S", |
| 1100 | "arch-arm/cortex-a15/bionic/strlen.S", |
| 1101 | |
| 1102 | "arch-arm/denver/bionic/memmove.S", |
| 1103 | ], |
| 1104 | exclude_srcs: [ |
| 1105 | "arch-arm/generic/bionic/memcpy.S", |
| 1106 | "arch-arm/generic/bionic/memset.S", |
| 1107 | "arch-arm/generic/bionic/strcmp.S", |
| 1108 | "arch-arm/generic/bionic/strcpy.S", |
| 1109 | "arch-arm/generic/bionic/strlen.c", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1110 | ], |
| 1111 | }, |
Christopher Ferris | 950a958 | 2017-03-29 13:10:56 -0700 | [diff] [blame] | 1112 | kryo: { |
| 1113 | srcs: [ |
Jake Weinstein | 04d99df | 2016-08-25 20:03:25 -0400 | [diff] [blame] | 1114 | "arch-arm/kryo/bionic/memcpy.S", |
Jake Weinstein | 4d114f9 | 2017-04-07 14:55:53 -0400 | [diff] [blame] | 1115 | "arch-arm/cortex-a7/bionic/memset.S", |
Christopher Ferris | 950a958 | 2017-03-29 13:10:56 -0700 | [diff] [blame] | 1116 | "arch-arm/krait/bionic/strcmp.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1117 | |
Christopher Ferris | 950a958 | 2017-03-29 13:10:56 -0700 | [diff] [blame] | 1118 | // Use cortex-a15 versions of strcat/strcpy/strlen. |
| 1119 | "arch-arm/cortex-a15/bionic/stpcpy.S", |
| 1120 | "arch-arm/cortex-a15/bionic/strcat.S", |
| 1121 | "arch-arm/cortex-a15/bionic/strcpy.S", |
| 1122 | "arch-arm/cortex-a15/bionic/strlen.S", |
| 1123 | |
| 1124 | "arch-arm/denver/bionic/memmove.S", |
| 1125 | ], |
| 1126 | exclude_srcs: [ |
| 1127 | "arch-arm/generic/bionic/memcpy.S", |
| 1128 | "arch-arm/generic/bionic/memset.S", |
| 1129 | "arch-arm/generic/bionic/strcmp.S", |
| 1130 | "arch-arm/generic/bionic/strcpy.S", |
| 1131 | "arch-arm/generic/bionic/strlen.c", |
Christopher Ferris | 950a958 | 2017-03-29 13:10:56 -0700 | [diff] [blame] | 1132 | ], |
| 1133 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1134 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1135 | arm64: { |
| 1136 | srcs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1137 | "arch-arm64/generic/bionic/memchr.S", |
| 1138 | "arch-arm64/generic/bionic/memcmp.S", |
| 1139 | "arch-arm64/generic/bionic/memcpy.S", |
| 1140 | "arch-arm64/generic/bionic/memmove.S", |
| 1141 | "arch-arm64/generic/bionic/memset.S", |
| 1142 | "arch-arm64/generic/bionic/stpcpy.S", |
| 1143 | "arch-arm64/generic/bionic/strchr.S", |
| 1144 | "arch-arm64/generic/bionic/strcmp.S", |
| 1145 | "arch-arm64/generic/bionic/strcpy.S", |
| 1146 | "arch-arm64/generic/bionic/strlen.S", |
| 1147 | "arch-arm64/generic/bionic/strncmp.S", |
| 1148 | "arch-arm64/generic/bionic/strnlen.S", |
| 1149 | "arch-arm64/generic/bionic/wmemmove.S", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1150 | |
| 1151 | "arch-arm64/bionic/__bionic_clone.S", |
| 1152 | "arch-arm64/bionic/_exit_with_stack_teardown.S", |
| 1153 | "arch-arm64/bionic/setjmp.S", |
| 1154 | "arch-arm64/bionic/syscall.S", |
| 1155 | "arch-arm64/bionic/vfork.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1156 | ], |
| 1157 | exclude_srcs: [ |
| 1158 | "bionic/__memcpy_chk.cpp", |
| 1159 | "bionic/strchr.cpp", |
| 1160 | "bionic/strnlen.c", |
| 1161 | ], |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1162 | denver64: { |
| 1163 | srcs: [ |
| 1164 | "arch-arm64/denver64/bionic/memcpy.S", |
| 1165 | "arch-arm64/denver64/bionic/memset.S", |
| 1166 | ], |
| 1167 | exclude_srcs: [ |
| 1168 | "arch-arm64/generic/bionic/memcpy.S", |
| 1169 | "arch-arm64/generic/bionic/memset.S", |
| 1170 | ], |
| 1171 | }, |
Jake Weinstein | 372f19e | 2016-11-17 16:01:25 -0500 | [diff] [blame] | 1172 | cortex_a53: { |
| 1173 | srcs: [ |
| 1174 | "arch-arm64/cortex-a53/bionic/memmove.S", |
| 1175 | ], |
| 1176 | exclude_srcs: [ |
| 1177 | "arch-arm64/generic/bionic/memmove.S", |
| 1178 | ], |
| 1179 | }, |
Christopher Ferris | 94bd274 | 2017-05-08 12:09:03 -0700 | [diff] [blame] | 1180 | cortex_a73: { |
| 1181 | srcs: [ |
| 1182 | "arch-arm64/cortex-a53/bionic/memmove.S", |
| 1183 | ], |
| 1184 | exclude_srcs: [ |
| 1185 | "arch-arm64/generic/bionic/memmove.S", |
| 1186 | ], |
| 1187 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1188 | }, |
| 1189 | |
| 1190 | mips: { |
| 1191 | srcs: [ |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1192 | "arch-mips/string/memcmp.c", |
Prashant Patil | fcb877a | 2017-03-16 18:07:00 +0530 | [diff] [blame] | 1193 | "arch-mips/string/memcpy.c", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1194 | "arch-mips/string/memset.S", |
| 1195 | "arch-mips/string/strcmp.S", |
Prashant Patil | fcb877a | 2017-03-16 18:07:00 +0530 | [diff] [blame] | 1196 | "arch-mips/string/strncmp.S", |
| 1197 | "arch-mips/string/strlen.c", |
| 1198 | "arch-mips/string/strnlen.c", |
| 1199 | "arch-mips/string/strchr.c", |
| 1200 | "arch-mips/string/strcpy.c", |
| 1201 | "arch-mips/string/memchr.c", |
| 1202 | "arch-mips/string/memmove.c", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1203 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1204 | "arch-mips/bionic/__bionic_clone.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1205 | "arch-mips/bionic/cacheflush.cpp", |
| 1206 | "arch-mips/bionic/_exit_with_stack_teardown.S", |
Dan Willemsen | 879cec2 | 2016-02-29 10:37:56 -0800 | [diff] [blame] | 1207 | "arch-mips/bionic/libgcc_compat.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1208 | "arch-mips/bionic/setjmp.S", |
| 1209 | "arch-mips/bionic/syscall.S", |
| 1210 | "arch-mips/bionic/vfork.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1211 | ], |
Prashant Patil | fcb877a | 2017-03-16 18:07:00 +0530 | [diff] [blame] | 1212 | exclude_srcs: [ |
| 1213 | "bionic/strchr.cpp", |
| 1214 | "bionic/strnlen.c", |
| 1215 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1216 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1217 | mips64: { |
| 1218 | srcs: [ |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1219 | "arch-mips/string/memcmp.c", |
Prashant Patil | fcb877a | 2017-03-16 18:07:00 +0530 | [diff] [blame] | 1220 | "arch-mips/string/memcpy.c", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1221 | "arch-mips/string/memset.S", |
| 1222 | "arch-mips/string/strcmp.S", |
Prashant Patil | fcb877a | 2017-03-16 18:07:00 +0530 | [diff] [blame] | 1223 | "arch-mips/string/strncmp.S", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1224 | "arch-mips/string/strlen.c", |
Prashant Patil | fcb877a | 2017-03-16 18:07:00 +0530 | [diff] [blame] | 1225 | "arch-mips/string/strnlen.c", |
| 1226 | "arch-mips/string/strchr.c", |
| 1227 | "arch-mips/string/strcpy.c", |
| 1228 | "arch-mips/string/memchr.c", |
| 1229 | "arch-mips/string/memmove.c", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1230 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1231 | "arch-mips64/bionic/__bionic_clone.S", |
| 1232 | "arch-mips64/bionic/_exit_with_stack_teardown.S", |
| 1233 | "arch-mips64/bionic/setjmp.S", |
| 1234 | "arch-mips64/bionic/syscall.S", |
| 1235 | "arch-mips64/bionic/vfork.S", |
| 1236 | "arch-mips64/bionic/stat.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1237 | ], |
Prashant Patil | fcb877a | 2017-03-16 18:07:00 +0530 | [diff] [blame] | 1238 | exclude_srcs: [ |
| 1239 | "bionic/strchr.cpp", |
| 1240 | "bionic/strnlen.c", |
| 1241 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1242 | }, |
| 1243 | |
| 1244 | x86: { |
| 1245 | srcs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1246 | "arch-x86/generic/string/memcmp.S", |
| 1247 | "arch-x86/generic/string/strcmp.S", |
| 1248 | "arch-x86/generic/string/strncmp.S", |
| 1249 | "arch-x86/generic/string/strcat.S", |
| 1250 | "arch-x86/atom/string/sse2-memchr-atom.S", |
| 1251 | "arch-x86/atom/string/sse2-memrchr-atom.S", |
| 1252 | "arch-x86/atom/string/sse2-strchr-atom.S", |
| 1253 | "arch-x86/atom/string/sse2-strnlen-atom.S", |
| 1254 | "arch-x86/atom/string/sse2-strrchr-atom.S", |
| 1255 | "arch-x86/atom/string/sse2-wcschr-atom.S", |
| 1256 | "arch-x86/atom/string/sse2-wcsrchr-atom.S", |
| 1257 | "arch-x86/atom/string/sse2-wcslen-atom.S", |
| 1258 | "arch-x86/atom/string/sse2-wcscmp-atom.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1259 | "arch-x86/silvermont/string/sse2-memcpy-slm.S", |
| 1260 | "arch-x86/silvermont/string/sse2-memmove-slm.S", |
| 1261 | "arch-x86/silvermont/string/sse2-memset-slm.S", |
| 1262 | "arch-x86/silvermont/string/sse2-stpcpy-slm.S", |
| 1263 | "arch-x86/silvermont/string/sse2-stpncpy-slm.S", |
| 1264 | "arch-x86/silvermont/string/sse2-strcpy-slm.S", |
| 1265 | "arch-x86/silvermont/string/sse2-strlen-slm.S", |
| 1266 | "arch-x86/silvermont/string/sse2-strncpy-slm.S", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1267 | |
| 1268 | "arch-x86/bionic/__bionic_clone.S", |
| 1269 | "arch-x86/bionic/_exit_with_stack_teardown.S", |
| 1270 | "arch-x86/bionic/libgcc_compat.c", |
| 1271 | "arch-x86/bionic/__restore.S", |
| 1272 | "arch-x86/bionic/setjmp.S", |
| 1273 | "arch-x86/bionic/syscall.S", |
| 1274 | "arch-x86/bionic/vfork.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1275 | ], |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1276 | |
| 1277 | exclude_srcs: [ |
| 1278 | "bionic/strchr.cpp", |
| 1279 | "bionic/strnlen.c", |
| 1280 | "bionic/strrchr.cpp", |
| 1281 | ], |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1282 | atom: { |
| 1283 | srcs: [ |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1284 | "arch-x86/atom/string/sse2-memset-atom.S", |
| 1285 | "arch-x86/atom/string/sse2-strlen-atom.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1286 | "arch-x86/atom/string/ssse3-memcmp-atom.S", |
Dan Willemsen | 701b545 | 2016-01-12 19:35:40 -0800 | [diff] [blame] | 1287 | "arch-x86/atom/string/ssse3-memcpy-atom.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1288 | "arch-x86/atom/string/ssse3-memmove-atom.S", |
Dan Willemsen | 701b545 | 2016-01-12 19:35:40 -0800 | [diff] [blame] | 1289 | "arch-x86/atom/string/ssse3-strcpy-atom.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1290 | "arch-x86/atom/string/ssse3-strncpy-atom.S", |
| 1291 | "arch-x86/atom/string/ssse3-wmemcmp-atom.S", |
| 1292 | ], |
| 1293 | exclude_srcs: [ |
| 1294 | "arch-x86/generic/string/memcmp.S", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1295 | "arch-x86/silvermont/string/sse2-memcpy-slm.S", |
| 1296 | "arch-x86/silvermont/string/sse2-memmove-slm.S", |
| 1297 | "arch-x86/silvermont/string/sse2-memset-slm.S", |
| 1298 | "arch-x86/silvermont/string/sse2-strcpy-slm.S", |
| 1299 | "arch-x86/silvermont/string/sse2-strlen-slm.S", |
| 1300 | "arch-x86/silvermont/string/sse2-strncpy-slm.S", |
| 1301 | ], |
| 1302 | }, |
| 1303 | ssse3: { |
| 1304 | srcs: [ |
| 1305 | "arch-x86/atom/string/ssse3-strncat-atom.S", |
| 1306 | "arch-x86/atom/string/ssse3-strlcat-atom.S", |
| 1307 | "arch-x86/atom/string/ssse3-strlcpy-atom.S", |
| 1308 | "arch-x86/atom/string/ssse3-strcat-atom.S", |
| 1309 | "arch-x86/atom/string/ssse3-strcmp-atom.S", |
| 1310 | "arch-x86/atom/string/ssse3-strncmp-atom.S", |
| 1311 | "arch-x86/atom/string/ssse3-wcscat-atom.S", |
| 1312 | "arch-x86/atom/string/ssse3-wcscpy-atom.S", |
| 1313 | ], |
| 1314 | exclude_srcs: [ |
| 1315 | "arch-x86/generic/string/strcmp.S", |
| 1316 | "arch-x86/generic/string/strncmp.S", |
| 1317 | "arch-x86/generic/string/strcat.S", |
| 1318 | ], |
| 1319 | }, |
| 1320 | sse4: { |
| 1321 | srcs: [ |
| 1322 | "arch-x86/silvermont/string/sse4-memcmp-slm.S", |
| 1323 | "arch-x86/silvermont/string/sse4-wmemcmp-slm.S", |
| 1324 | ], |
| 1325 | exclude_srcs: [ |
| 1326 | "arch-x86/generic/string/memcmp.S", |
| 1327 | ], |
| 1328 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1329 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1330 | x86_64: { |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1331 | srcs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1332 | "arch-x86_64/string/sse2-memcpy-slm.S", |
| 1333 | "arch-x86_64/string/sse2-memmove-slm.S", |
| 1334 | "arch-x86_64/string/sse2-memset-slm.S", |
| 1335 | "arch-x86_64/string/sse2-stpcpy-slm.S", |
| 1336 | "arch-x86_64/string/sse2-stpncpy-slm.S", |
| 1337 | "arch-x86_64/string/sse2-strcat-slm.S", |
| 1338 | "arch-x86_64/string/sse2-strcpy-slm.S", |
| 1339 | "arch-x86_64/string/sse2-strlcat-slm.S", |
| 1340 | "arch-x86_64/string/sse2-strlcpy-slm.S", |
| 1341 | "arch-x86_64/string/sse2-strlen-slm.S", |
| 1342 | "arch-x86_64/string/sse2-strncat-slm.S", |
| 1343 | "arch-x86_64/string/sse2-strncpy-slm.S", |
| 1344 | "arch-x86_64/string/sse4-memcmp-slm.S", |
| 1345 | "arch-x86_64/string/ssse3-strcmp-slm.S", |
| 1346 | "arch-x86_64/string/ssse3-strncmp-slm.S", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1347 | |
| 1348 | "arch-x86_64/bionic/__bionic_clone.S", |
| 1349 | "arch-x86_64/bionic/_exit_with_stack_teardown.S", |
| 1350 | "arch-x86_64/bionic/__restore_rt.S", |
| 1351 | "arch-x86_64/bionic/setjmp.S", |
| 1352 | "arch-x86_64/bionic/syscall.S", |
| 1353 | "arch-x86_64/bionic/vfork.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1354 | ], |
| 1355 | }, |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1356 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1357 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1358 | cppflags: ["-Wold-style-cast"], |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1359 | include_dirs: ["bionic/libstdc++/include"], |
| 1360 | name: "libc_bionic", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1361 | } |
| 1362 | |
Elliott Hughes | 3f6eee9 | 2016-12-13 23:47:25 +0000 | [diff] [blame] | 1363 | genrule { |
| 1364 | name: "generated_android_ids", |
Colin Cross | 35bbed8 | 2017-01-17 18:16:07 -0800 | [diff] [blame] | 1365 | out: ["generated_android_ids.h"], |
| 1366 | srcs: [":android_filesystem_config_header"], |
| 1367 | tool_files: ["fs_config_generator.py"], |
| 1368 | cmd: "$(location fs_config_generator.py) aidarray $(in) > $(out)", |
Elliott Hughes | 3f6eee9 | 2016-12-13 23:47:25 +0000 | [diff] [blame] | 1369 | } |
| 1370 | |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1371 | // ======================================================== |
| 1372 | // libc_bionic_ndk.a- The portions of libc_bionic that can |
| 1373 | // be safely used in libc_ndk.a (no troublesome global data |
| 1374 | // or constructors). |
| 1375 | // ======================================================== |
| 1376 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1377 | defaults: ["libc_defaults"], |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1378 | srcs: [ |
Dan Albert | e2fd010 | 2017-07-11 14:27:07 -0700 | [diff] [blame] | 1379 | "bionic/NetdClientDispatch.cpp", |
Sandeep Patil | 9b1ca56 | 2017-08-21 12:17:19 -0700 | [diff] [blame] | 1380 | "bionic/__bionic_get_shell_path.cpp", |
Dan Albert | e2fd010 | 2017-07-11 14:27:07 -0700 | [diff] [blame] | 1381 | "bionic/__cmsg_nxthdr.cpp", |
| 1382 | "bionic/__errno.cpp", |
| 1383 | "bionic/__gnu_basename.cpp", |
| 1384 | "bionic/__libc_current_sigrtmax.cpp", |
| 1385 | "bionic/__libc_current_sigrtmin.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1386 | "bionic/abort.cpp", |
| 1387 | "bionic/accept.cpp", |
| 1388 | "bionic/accept4.cpp", |
| 1389 | "bionic/access.cpp", |
| 1390 | "bionic/arpa_inet.cpp", |
| 1391 | "bionic/assert.cpp", |
| 1392 | "bionic/atof.cpp", |
Josh Gao | a170d9b | 2016-11-10 16:08:29 -0800 | [diff] [blame] | 1393 | "bionic/bionic_arc4random.cpp", |
Tom Cherry | ac49ced | 2017-08-17 13:18:52 -0700 | [diff] [blame] | 1394 | "bionic/bionic_futex.cpp", |
Colin Cross | 8ce38af | 2016-01-19 12:50:20 -0800 | [diff] [blame] | 1395 | "bionic/bionic_netlink.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1396 | "bionic/bionic_systrace.cpp", |
| 1397 | "bionic/bionic_time_conversions.cpp", |
| 1398 | "bionic/brk.cpp", |
| 1399 | "bionic/c16rtomb.cpp", |
| 1400 | "bionic/c32rtomb.cpp", |
| 1401 | "bionic/chmod.cpp", |
| 1402 | "bionic/chown.cpp", |
| 1403 | "bionic/clearenv.cpp", |
| 1404 | "bionic/clock.cpp", |
| 1405 | "bionic/clock_getcpuclockid.cpp", |
| 1406 | "bionic/clock_nanosleep.cpp", |
| 1407 | "bionic/clone.cpp", |
| 1408 | "bionic/close.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1409 | "bionic/connect.cpp", |
| 1410 | "bionic/ctype.cpp", |
| 1411 | "bionic/dirent.cpp", |
| 1412 | "bionic/dup2.cpp", |
Victor Khimenko | 0a0743f | 2017-07-10 21:15:37 +0200 | [diff] [blame] | 1413 | "bionic/environ.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1414 | "bionic/epoll_create.cpp", |
| 1415 | "bionic/epoll_pwait.cpp", |
| 1416 | "bionic/epoll_wait.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1417 | "bionic/error.cpp", |
| 1418 | "bionic/eventfd_read.cpp", |
| 1419 | "bionic/eventfd_write.cpp", |
Elliott Hughes | e19c672 | 2016-08-26 16:15:57 +0000 | [diff] [blame] | 1420 | "bionic/exec.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1421 | "bionic/faccessat.cpp", |
| 1422 | "bionic/fchmod.cpp", |
| 1423 | "bionic/fchmodat.cpp", |
| 1424 | "bionic/ffs.cpp", |
| 1425 | "bionic/fgetxattr.cpp", |
| 1426 | "bionic/flistxattr.cpp", |
| 1427 | "bionic/flockfile.cpp", |
| 1428 | "bionic/fpclassify.cpp", |
| 1429 | "bionic/fsetxattr.cpp", |
| 1430 | "bionic/ftruncate.cpp", |
Elliott Hughes | 13d79ab | 2016-04-15 17:40:33 -0700 | [diff] [blame] | 1431 | "bionic/ftw.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1432 | "bionic/futimens.cpp", |
| 1433 | "bionic/getcwd.cpp", |
Dan Willemsen | 23aae1c | 2016-03-29 15:21:38 -0700 | [diff] [blame] | 1434 | "bionic/getdomainname.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1435 | "bionic/gethostname.cpp", |
Elliott Hughes | e4510a2 | 2016-04-06 08:34:58 -0700 | [diff] [blame] | 1436 | "bionic/getpagesize.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1437 | "bionic/getpgrp.cpp", |
| 1438 | "bionic/getpid.cpp", |
Elliott Hughes | 8f0e42f | 2016-11-29 15:10:29 -0800 | [diff] [blame] | 1439 | "bionic/getpriority.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1440 | "bionic/gettid.cpp", |
Mark Salyzyn | b38347a | 2016-04-05 09:09:46 -0700 | [diff] [blame] | 1441 | "bionic/grp_pwd.cpp", |
Elliott Hughes | a648733 | 2017-08-15 23:16:48 -0700 | [diff] [blame] | 1442 | "bionic/iconv.cpp", |
Elliott Hughes | c41b560 | 2017-07-27 17:08:08 -0700 | [diff] [blame] | 1443 | "bionic/icu_wrappers.cpp", |
Dan Willemsen | 9b59acc | 2016-01-05 14:32:06 -0800 | [diff] [blame] | 1444 | "bionic/ifaddrs.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1445 | "bionic/inotify_init.cpp", |
Dan Willemsen | dc6b0a7 | 2015-11-09 14:03:46 -0800 | [diff] [blame] | 1446 | "bionic/ioctl.cpp", |
Elliott Hughes | 7532b32 | 2017-07-11 15:00:17 -0700 | [diff] [blame] | 1447 | "bionic/killpg.cpp", |
Elliott Hughes | fc8e688 | 2016-11-18 16:27:29 -0800 | [diff] [blame] | 1448 | "bionic/langinfo.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1449 | "bionic/lchown.cpp", |
| 1450 | "bionic/lfs64_support.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1451 | "bionic/libc_init_common.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1452 | "bionic/libgen.cpp", |
| 1453 | "bionic/link.cpp", |
| 1454 | "bionic/locale.cpp", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1455 | "bionic/lockf.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1456 | "bionic/lstat.cpp", |
| 1457 | "bionic/malloc_info.cpp", |
Colin Cross | ee84786 | 2016-04-29 14:06:07 -0700 | [diff] [blame] | 1458 | "bionic/mblen.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1459 | "bionic/mbrtoc16.cpp", |
| 1460 | "bionic/mbrtoc32.cpp", |
Elliott Hughes | cae33ad | 2016-08-15 14:14:40 -0700 | [diff] [blame] | 1461 | "bionic/memmem.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1462 | "bionic/mempcpy.cpp", |
| 1463 | "bionic/mkdir.cpp", |
| 1464 | "bionic/mkfifo.cpp", |
| 1465 | "bionic/mknod.cpp", |
| 1466 | "bionic/mntent.cpp", |
Dan Willemsen | dc6b0a7 | 2015-11-09 14:03:46 -0800 | [diff] [blame] | 1467 | "bionic/mremap.cpp", |
Colin Cross | 8ce38af | 2016-01-19 12:50:20 -0800 | [diff] [blame] | 1468 | "bionic/net_if.cpp", |
Dan Albert | e2fd010 | 2017-07-11 14:27:07 -0700 | [diff] [blame] | 1469 | "bionic/netdb.cpp", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1470 | "bionic/netinet_in.cpp", |
Elliott Hughes | 6cfb84b | 2016-04-06 17:14:45 -0700 | [diff] [blame] | 1471 | "bionic/nl_types.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1472 | "bionic/open.cpp", |
| 1473 | "bionic/pathconf.cpp", |
| 1474 | "bionic/pause.cpp", |
| 1475 | "bionic/pipe.cpp", |
| 1476 | "bionic/poll.cpp", |
| 1477 | "bionic/posix_fadvise.cpp", |
| 1478 | "bionic/posix_fallocate.cpp", |
| 1479 | "bionic/posix_madvise.cpp", |
| 1480 | "bionic/posix_timers.cpp", |
| 1481 | "bionic/ptrace.cpp", |
| 1482 | "bionic/pty.cpp", |
| 1483 | "bionic/raise.cpp", |
| 1484 | "bionic/rand.cpp", |
| 1485 | "bionic/readlink.cpp", |
| 1486 | "bionic/reboot.cpp", |
| 1487 | "bionic/recv.cpp", |
| 1488 | "bionic/rename.cpp", |
| 1489 | "bionic/rmdir.cpp", |
| 1490 | "bionic/scandir.cpp", |
| 1491 | "bionic/sched_getaffinity.cpp", |
| 1492 | "bionic/sched_getcpu.cpp", |
| 1493 | "bionic/semaphore.cpp", |
| 1494 | "bionic/send.cpp", |
| 1495 | "bionic/setegid.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1496 | "bionic/seteuid.cpp", |
| 1497 | "bionic/setpgrp.cpp", |
| 1498 | "bionic/sigaction.cpp", |
| 1499 | "bionic/sigaddset.cpp", |
| 1500 | "bionic/sigdelset.cpp", |
| 1501 | "bionic/sigemptyset.cpp", |
| 1502 | "bionic/sigfillset.cpp", |
Colin Cross | b839610 | 2016-04-07 13:24:50 -0700 | [diff] [blame] | 1503 | "bionic/sighold.cpp", |
| 1504 | "bionic/sigignore.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1505 | "bionic/sigismember.cpp", |
| 1506 | "bionic/signal.cpp", |
| 1507 | "bionic/signalfd.cpp", |
Colin Cross | b839610 | 2016-04-07 13:24:50 -0700 | [diff] [blame] | 1508 | "bionic/sigpause.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1509 | "bionic/sigpending.cpp", |
| 1510 | "bionic/sigprocmask.cpp", |
| 1511 | "bionic/sigqueue.cpp", |
Colin Cross | b839610 | 2016-04-07 13:24:50 -0700 | [diff] [blame] | 1512 | "bionic/sigrelse.cpp", |
| 1513 | "bionic/sigset.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1514 | "bionic/sigsuspend.cpp", |
| 1515 | "bionic/sigtimedwait.cpp", |
| 1516 | "bionic/sigwait.cpp", |
| 1517 | "bionic/sigwaitinfo.cpp", |
| 1518 | "bionic/socket.cpp", |
Elliott Hughes | 14e3ff9 | 2017-10-06 16:58:36 -0700 | [diff] [blame] | 1519 | "bionic/spawn.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1520 | "bionic/stat.cpp", |
| 1521 | "bionic/statvfs.cpp", |
Dan Albert | e2fd010 | 2017-07-11 14:27:07 -0700 | [diff] [blame] | 1522 | "bionic/stdlib_l.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1523 | "bionic/strchrnul.cpp", |
| 1524 | "bionic/strerror.cpp", |
| 1525 | "bionic/strerror_r.cpp", |
Dan Albert | e2fd010 | 2017-07-11 14:27:07 -0700 | [diff] [blame] | 1526 | "bionic/string_l.cpp", |
| 1527 | "bionic/strings_l.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1528 | "bionic/strsignal.cpp", |
| 1529 | "bionic/strtold.cpp", |
Elliott Hughes | fa386e0 | 2017-10-18 13:34:32 -0700 | [diff] [blame] | 1530 | "bionic/swab.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1531 | "bionic/symlink.cpp", |
Colin Cross | fc8ed2f | 2016-04-11 14:51:38 -0700 | [diff] [blame] | 1532 | "bionic/sync_file_range.cpp", |
Elliott Hughes | 7c59f3f | 2016-08-16 18:14:26 -0700 | [diff] [blame] | 1533 | "bionic/sys_msg.cpp", |
| 1534 | "bionic/sys_sem.cpp", |
| 1535 | "bionic/sys_shm.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1536 | "bionic/sys_siglist.c", |
| 1537 | "bionic/sys_signame.c", |
Elliott Hughes | 449eff0 | 2016-06-08 19:51:20 -0700 | [diff] [blame] | 1538 | "bionic/sys_time.cpp", |
Dan Albert | e2fd010 | 2017-07-11 14:27:07 -0700 | [diff] [blame] | 1539 | "bionic/sysinfo.cpp", |
| 1540 | "bionic/syslog.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1541 | "bionic/tdestroy.cpp", |
| 1542 | "bionic/termios.cpp", |
| 1543 | "bionic/thread_private.cpp", |
| 1544 | "bionic/tmpfile.cpp", |
| 1545 | "bionic/umount.cpp", |
| 1546 | "bionic/unlink.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1547 | "bionic/wait.cpp", |
| 1548 | "bionic/wchar.cpp", |
Dan Albert | e2fd010 | 2017-07-11 14:27:07 -0700 | [diff] [blame] | 1549 | "bionic/wchar_l.cpp", |
Elliott Hughes | 7f0849f | 2016-08-26 16:17:17 -0700 | [diff] [blame] | 1550 | "bionic/wcstod.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1551 | "bionic/wctype.cpp", |
Elliott Hughes | c41b560 | 2017-07-27 17:08:08 -0700 | [diff] [blame] | 1552 | "bionic/wcwidth.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1553 | "bionic/wmempcpy.cpp", |
Tom Cherry | fd44b9f | 2017-11-08 14:01:00 -0800 | [diff] [blame^] | 1554 | "system_properties/context_node.cpp", |
| 1555 | "system_properties/contexts_split.cpp", |
| 1556 | "system_properties/prop_area.cpp", |
| 1557 | "system_properties/prop_info.cpp", |
| 1558 | "system_properties/system_properties.cpp", |
| 1559 | |
Josh Gao | 0e0e370 | 2017-10-12 13:34:42 -0700 | [diff] [blame] | 1560 | |
| 1561 | // This contains a weak stub implementation of __find_icu_symbol for wctype.cpp, |
| 1562 | // which will be overridden by the actual one in libc.so. |
| 1563 | "bionic/icu_static.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1564 | ], |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1565 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1566 | multilib: { |
| 1567 | lib32: { |
| 1568 | // LP32 cruft |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 1569 | srcs: ["bionic/mmap.cpp"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1570 | }, |
| 1571 | }, |
Jayant Chowdhary | ab2f79c | 2017-09-01 16:29:44 -0700 | [diff] [blame] | 1572 | product_variables: { |
| 1573 | treble: { |
| 1574 | cflags: ["-D__ANDROID_TREBLE__"], |
| 1575 | }, |
| 1576 | }, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1577 | cppflags: ["-Wold-style-cast"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1578 | local_include_dirs: ["stdio"], |
| 1579 | include_dirs: ["bionic/libstdc++/include"], |
| 1580 | name: "libc_bionic_ndk", |
Elliott Hughes | 3f6eee9 | 2016-12-13 23:47:25 +0000 | [diff] [blame] | 1581 | generated_headers: ["generated_android_ids"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1582 | } |
| 1583 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1584 | // ======================================================== |
| 1585 | // libc_pthread.a - pthreads parts that previously lived in |
| 1586 | // libc_bionic.a. Relocated to their own library because |
| 1587 | // they can't be included in libc_ndk.a (as they layout of |
| 1588 | // pthread_t has changed over the years and has ABI |
| 1589 | // compatibility issues). |
| 1590 | // ======================================================== |
| 1591 | |
| 1592 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1593 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1594 | srcs: [ |
| 1595 | "bionic/pthread_atfork.cpp", |
| 1596 | "bionic/pthread_attr.cpp", |
Colin Cross | a35d23d | 2015-11-19 13:32:49 -0800 | [diff] [blame] | 1597 | "bionic/pthread_barrier.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1598 | "bionic/pthread_cond.cpp", |
| 1599 | "bionic/pthread_create.cpp", |
| 1600 | "bionic/pthread_detach.cpp", |
| 1601 | "bionic/pthread_equal.cpp", |
| 1602 | "bionic/pthread_exit.cpp", |
| 1603 | "bionic/pthread_getcpuclockid.cpp", |
| 1604 | "bionic/pthread_getschedparam.cpp", |
| 1605 | "bionic/pthread_gettid_np.cpp", |
Elliott Hughes | 7484c21 | 2017-02-02 02:41:38 +0000 | [diff] [blame] | 1606 | "bionic/pthread_internal.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1607 | "bionic/pthread_join.cpp", |
| 1608 | "bionic/pthread_key.cpp", |
| 1609 | "bionic/pthread_kill.cpp", |
| 1610 | "bionic/pthread_mutex.cpp", |
| 1611 | "bionic/pthread_once.cpp", |
| 1612 | "bionic/pthread_rwlock.cpp", |
| 1613 | "bionic/pthread_self.cpp", |
| 1614 | "bionic/pthread_setname_np.cpp", |
| 1615 | "bionic/pthread_setschedparam.cpp", |
| 1616 | "bionic/pthread_sigmask.cpp", |
Colin Cross | a35d23d | 2015-11-19 13:32:49 -0800 | [diff] [blame] | 1617 | "bionic/pthread_spinlock.cpp", |
Josh Gao | 0e0e370 | 2017-10-12 13:34:42 -0700 | [diff] [blame] | 1618 | |
| 1619 | // The following implementations depend on pthread data or implementation, |
| 1620 | // so we can't include them in libc_ndk.a. |
| 1621 | "bionic/__cxa_thread_atexit_impl.cpp", |
| 1622 | "stdlib/atexit.c", |
| 1623 | "bionic/fork.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1624 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1625 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1626 | cppflags: ["-Wold-style-cast"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1627 | include_dirs: ["bionic/libstdc++/include"], |
| 1628 | name: "libc_pthread", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1629 | } |
| 1630 | |
| 1631 | // ======================================================== |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1632 | // libc_syscalls.a |
| 1633 | // ======================================================== |
| 1634 | |
| 1635 | cc_library_static { |
Colin Cross | 27c43c5 | 2016-04-07 13:27:24 -0700 | [diff] [blame] | 1636 | defaults: ["libc_defaults"], |
Josh Gao | 0e0e370 | 2017-10-12 13:34:42 -0700 | [diff] [blame] | 1637 | srcs: ["bionic/__set_errno.cpp"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1638 | arch: { |
| 1639 | arm: { |
| 1640 | srcs: ["arch-arm/syscalls/**/*.S"], |
| 1641 | }, |
| 1642 | arm64: { |
| 1643 | srcs: ["arch-arm64/syscalls/**/*.S"], |
| 1644 | }, |
| 1645 | mips: { |
| 1646 | srcs: ["arch-mips/syscalls/**/*.S"], |
| 1647 | }, |
| 1648 | mips64: { |
| 1649 | srcs: ["arch-mips64/syscalls/**/*.S"], |
| 1650 | }, |
| 1651 | x86: { |
| 1652 | srcs: ["arch-x86/syscalls/**/*.S"], |
| 1653 | }, |
| 1654 | x86_64: { |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1655 | srcs: ["arch-x86_64/syscalls/**/*.S"], |
| 1656 | }, |
| 1657 | }, |
| 1658 | name: "libc_syscalls", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1659 | } |
| 1660 | |
| 1661 | // ======================================================== |
| 1662 | // libc_aeabi.a |
| 1663 | // This is an LP32 ARM-only library that needs to be built with -fno-builtin |
| 1664 | // to avoid infinite recursion. For the other architectures we just build an |
| 1665 | // empty library to keep this makefile simple. |
| 1666 | // ======================================================== |
| 1667 | |
| 1668 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1669 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1670 | arch: { |
| 1671 | arm: { |
| 1672 | srcs: ["arch-arm/bionic/__aeabi.c"], |
| 1673 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1674 | }, |
| 1675 | name: "libc_aeabi", |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1676 | cflags: ["-fno-builtin"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1677 | } |
| 1678 | |
| 1679 | // ======================================================== |
| 1680 | // libc_ndk.a |
| 1681 | // Compatibility library for the NDK. This library contains |
| 1682 | // all the parts of libc that are safe to statically link. |
| 1683 | // We can't safely statically link things that can only run |
| 1684 | // on a certain version of the OS. Examples include |
| 1685 | // anything that talks to netd (a large portion of the DNS |
| 1686 | // code) and anything that is dependent on the layout of a |
| 1687 | // data structure that has changed across releases (such as |
| 1688 | // pthread_t). |
| 1689 | // ======================================================== |
| 1690 | |
| 1691 | cc_library_static { |
| 1692 | name: "libc_ndk", |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1693 | defaults: ["libc_defaults"], |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1694 | srcs: libc_common_src_files + ["bionic/malloc_common.cpp"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1695 | multilib: { |
| 1696 | lib32: { |
| 1697 | srcs: libc_common_src_files_32, |
| 1698 | }, |
| 1699 | }, |
| 1700 | arch: { |
| 1701 | arm: { |
| 1702 | srcs: [ |
| 1703 | "arch-arm/bionic/exidx_dynamic.c", |
| 1704 | "arch-common/bionic/crtbegin_so.c", |
| 1705 | "arch-arm/bionic/atexit_legacy.c", |
| 1706 | "arch-common/bionic/crtend_so.S", |
| 1707 | ], |
| 1708 | whole_static_libs: ["libc_aeabi"], |
| 1709 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1710 | }, |
| 1711 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1712 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1713 | "-fvisibility=hidden", |
| 1714 | "-DLIBC_STATIC", |
| 1715 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1716 | |
| 1717 | whole_static_libs: [ |
| 1718 | "libc_bionic_ndk", |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 1719 | "libc_fortify", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1720 | "libc_freebsd", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 1721 | "libc_freebsd_large_stack", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1722 | "libc_gdtoa", |
| 1723 | "libc_malloc", |
| 1724 | "libc_netbsd", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 1725 | "libc_openbsd_large_stack", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1726 | "libc_openbsd_ndk", |
| 1727 | "libc_stack_protector", |
| 1728 | "libc_syscalls", |
| 1729 | "libc_tzcode", |
| 1730 | "libm", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1731 | "libjemalloc", |
Elliott Hughes | 816fab9 | 2016-05-27 17:57:46 -0700 | [diff] [blame] | 1732 | "libstdc++", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1733 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1734 | } |
| 1735 | |
| 1736 | // ======================================================== |
Josh Gao | 0e0e370 | 2017-10-12 13:34:42 -0700 | [diff] [blame] | 1737 | // libc_nopthread.a |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1738 | // ======================================================== |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1739 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1740 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1741 | srcs: libc_common_src_files, |
| 1742 | multilib: { |
| 1743 | lib32: { |
| 1744 | srcs: libc_common_src_files_32, |
| 1745 | }, |
| 1746 | }, |
Josh Gao | 0e0e370 | 2017-10-12 13:34:42 -0700 | [diff] [blame] | 1747 | name: "libc_nopthread", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1748 | |
| 1749 | whole_static_libs: [ |
| 1750 | "libc_bionic", |
| 1751 | "libc_bionic_ndk", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1752 | "libc_dns", |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 1753 | "libc_fortify", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1754 | "libc_freebsd", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 1755 | "libc_freebsd_large_stack", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1756 | "libc_gdtoa", |
| 1757 | "libc_malloc", |
| 1758 | "libc_netbsd", |
| 1759 | "libc_openbsd", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 1760 | "libc_openbsd_large_stack", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1761 | "libc_openbsd_ndk", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1762 | "libc_stack_protector", |
| 1763 | "libc_syscalls", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1764 | "libc_tzcode", |
Elliott Hughes | 816fab9 | 2016-05-27 17:57:46 -0700 | [diff] [blame] | 1765 | "libstdc++", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1766 | ], |
| 1767 | |
| 1768 | arch: { |
| 1769 | arm: { |
| 1770 | whole_static_libs: ["libc_aeabi"], |
| 1771 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1772 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1773 | } |
| 1774 | |
| 1775 | // ======================================================== |
Josh Gao | 0e0e370 | 2017-10-12 13:34:42 -0700 | [diff] [blame] | 1776 | // libc_common.a |
| 1777 | // ======================================================== |
| 1778 | |
| 1779 | cc_library_static { |
| 1780 | defaults: ["libc_defaults"], |
| 1781 | name: "libc_common", |
| 1782 | |
| 1783 | whole_static_libs: [ |
| 1784 | "libc_nopthread", |
| 1785 | "libc_pthread", |
| 1786 | ], |
| 1787 | } |
| 1788 | |
| 1789 | // ======================================================== |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1790 | // libc_nomalloc.a |
| 1791 | // ======================================================== |
| 1792 | // |
| 1793 | // This is a version of the static C library that does not |
| 1794 | // include malloc. It's useful in situations when the user wants |
| 1795 | // to provide their own malloc implementation, or wants to |
| 1796 | // explicitly disallow the use of malloc, such as in the |
| 1797 | // dynamic linker. |
| 1798 | |
| 1799 | cc_library_static { |
Dimitry Ivanov | fc0d480 | 2016-12-06 11:10:09 -0800 | [diff] [blame] | 1800 | name: "libc_nomalloc", |
| 1801 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1802 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1803 | |
| 1804 | arch: { |
| 1805 | arm: { |
| 1806 | srcs: ["arch-arm/bionic/exidx_static.c"], |
| 1807 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1808 | }, |
| 1809 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1810 | cflags: ["-DLIBC_STATIC"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1811 | |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 1812 | whole_static_libs: [ |
| 1813 | "libc_common", |
| 1814 | "libc_init_static", |
| 1815 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1816 | } |
| 1817 | |
| 1818 | // ======================================================== |
| 1819 | // libc_malloc.a: the _prefixed_ malloc functions (like dlcalloc). |
| 1820 | // ======================================================== |
| 1821 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1822 | defaults: ["libc_defaults"], |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1823 | srcs: ["bionic/jemalloc_wrapper.cpp"], |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1824 | cflags: ["-fvisibility=hidden"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1825 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1826 | name: "libc_malloc", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1827 | } |
| 1828 | |
| 1829 | // ======================================================== |
| 1830 | // libc.a + libc.so |
| 1831 | // ======================================================== |
| 1832 | cc_library { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1833 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1834 | name: "libc", |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1835 | product_variables: { |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1836 | platform_sdk_version: { |
| 1837 | asflags: ["-DPLATFORM_SDK_VERSION=%d"], |
| 1838 | }, |
| 1839 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1840 | static: { |
| 1841 | srcs: [ |
| 1842 | "bionic/dl_iterate_phdr_static.cpp", |
Dan Willemsen | 0c65708 | 2016-05-12 01:43:07 -0700 | [diff] [blame] | 1843 | "bionic/malloc_common.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1844 | ], |
| 1845 | cflags: ["-DLIBC_STATIC"], |
Christopher Ferris | 7a3681e | 2017-04-24 17:48:32 -0700 | [diff] [blame] | 1846 | whole_static_libs: ["libc_init_static"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1847 | }, |
| 1848 | shared: { |
| 1849 | srcs: [ |
| 1850 | "arch-common/bionic/crtbegin_so.c", |
| 1851 | "arch-common/bionic/crtbrand.S", |
Elliott Hughes | a57ca0d | 2016-11-17 18:18:08 -0800 | [diff] [blame] | 1852 | "bionic/icu.cpp", |
Dan Willemsen | 0c65708 | 2016-05-12 01:43:07 -0700 | [diff] [blame] | 1853 | "bionic/malloc_common.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1854 | "bionic/NetdClient.cpp", |
| 1855 | "arch-common/bionic/crtend_so.S", |
| 1856 | ], |
Stephen Crane | f4b1cbd | 2017-05-09 14:27:43 -0700 | [diff] [blame] | 1857 | whole_static_libs: ["libc_init_dynamic"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1858 | }, |
| 1859 | |
| 1860 | required: ["tzdata"], |
| 1861 | |
| 1862 | // Leave the symbols in the shared library so that stack unwinders can produce |
| 1863 | // meaningful name resolution. |
Colin Cross | 37f3632 | 2016-04-25 14:09:13 -0700 | [diff] [blame] | 1864 | strip: { |
| 1865 | keep_symbols: true, |
| 1866 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1867 | |
Colin Cross | 4ce94d2 | 2016-11-15 13:15:43 -0800 | [diff] [blame] | 1868 | // Do not pack libc.so relocations; see http://b/20645321 for details. |
| 1869 | pack_relocations: false, |
| 1870 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1871 | // WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries, |
| 1872 | // make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This |
| 1873 | // ensures that symbols that are pulled into those new libraries from libgcc.a are not declared |
| 1874 | // external; if that were the case, then libc would not pull those symbols from libgcc.a as it |
| 1875 | // should, instead relying on the external symbols from the dependent libraries. That would |
| 1876 | // create a "cloaked" dependency on libgcc.a in libc though the libraries, which is not what |
| 1877 | // you wanted! |
| 1878 | |
| 1879 | shared_libs: ["libdl"], |
Christopher Ferris | 7a3681e | 2017-04-24 17:48:32 -0700 | [diff] [blame] | 1880 | whole_static_libs: ["libc_common", "libjemalloc"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1881 | |
| 1882 | nocrt: true, |
| 1883 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1884 | arch: { |
| 1885 | arm: { |
Dmitriy Ivanov | 280d546 | 2015-09-28 10:14:17 -0700 | [diff] [blame] | 1886 | //TODO: This is to work around b/24465209. Remove after root cause is fixed |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1887 | ldflags: ["-Wl,--hash-style=both"], |
| 1888 | |
Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1889 | // Don't re-export new/delete and friends, even if the compiler really wants to. |
| 1890 | version_script: "libc.arm.map", |
| 1891 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1892 | shared: { |
Dan Willemsen | 0c65708 | 2016-05-12 01:43:07 -0700 | [diff] [blame] | 1893 | srcs: [ |
| 1894 | "arch-arm/bionic/exidx_dynamic.c", |
| 1895 | |
| 1896 | // special for arm |
| 1897 | "arch-arm/bionic/atexit_legacy.c", |
| 1898 | ], |
| 1899 | // special for arm |
| 1900 | cflags: ["-DCRT_LEGACY_WORKAROUND"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1901 | }, |
| 1902 | static: { |
| 1903 | srcs: ["arch-arm/bionic/exidx_static.c"], |
| 1904 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1905 | }, |
Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1906 | arm64: { |
| 1907 | // Don't re-export new/delete and friends, even if the compiler really wants to. |
| 1908 | version_script: "libc.arm64.map", |
| 1909 | }, |
| 1910 | mips: { |
| 1911 | // Don't re-export new/delete and friends, even if the compiler really wants to. |
| 1912 | version_script: "libc.mips.map", |
| 1913 | }, |
| 1914 | mips64: { |
| 1915 | // Don't re-export new/delete and friends, even if the compiler really wants to. |
| 1916 | version_script: "libc.mips64.map", |
| 1917 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1918 | x86: { |
Dmitriy Ivanov | 280d546 | 2015-09-28 10:14:17 -0700 | [diff] [blame] | 1919 | //TODO: This is to work around b/24465209. Remove after root cause is fixed |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1920 | ldflags: ["-Wl,--hash-style=both"], |
Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1921 | |
| 1922 | // Don't re-export new/delete and friends, even if the compiler really wants to. |
| 1923 | version_script: "libc.x86.map", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1924 | }, |
| 1925 | x86_64: { |
Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1926 | // Don't re-export new/delete and friends, even if the compiler really wants to. |
| 1927 | version_script: "libc.x86_64.map", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1928 | }, |
| 1929 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1930 | } |
| 1931 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1932 | // ======================================================== |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1933 | // libstdc++.so + libstdc++.a |
| 1934 | // ======================================================== |
| 1935 | cc_library { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1936 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1937 | include_dirs: ["bionic/libstdc++/include"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1938 | srcs: [ |
| 1939 | "bionic/__cxa_guard.cpp", |
| 1940 | "bionic/__cxa_pure_virtual.cpp", |
| 1941 | "bionic/new.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1942 | ], |
| 1943 | name: "libstdc++", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1944 | system_shared_libs: ["libc"], |
Christopher Ferris | 7a3681e | 2017-04-24 17:48:32 -0700 | [diff] [blame] | 1945 | static_libs: ["libasync_safe"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1946 | |
Dimitry Ivanov | 6cc8d47 | 2016-07-28 13:52:17 -0700 | [diff] [blame] | 1947 | //TODO (dimitry): This is to work around b/24465209. Remove after root cause is fixed |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1948 | arch: { |
| 1949 | arm: { |
| 1950 | ldflags: ["-Wl,--hash-style=both"], |
Dimitry Ivanov | 6cc8d47 | 2016-07-28 13:52:17 -0700 | [diff] [blame] | 1951 | version_script: "libstdc++.arm.map", |
| 1952 | }, |
| 1953 | arm64: { |
| 1954 | version_script: "libstdc++.arm64.map", |
| 1955 | }, |
| 1956 | mips: { |
| 1957 | version_script: "libstdc++.mips.map", |
| 1958 | }, |
| 1959 | mips64: { |
| 1960 | version_script: "libstdc++.mips64.map", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1961 | }, |
| 1962 | x86: { |
| 1963 | ldflags: ["-Wl,--hash-style=both"], |
Dimitry Ivanov | 6cc8d47 | 2016-07-28 13:52:17 -0700 | [diff] [blame] | 1964 | version_script: "libstdc++.x86.map", |
| 1965 | }, |
| 1966 | x86_64: { |
| 1967 | version_script: "libstdc++.x86_64.map", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1968 | }, |
| 1969 | }, |
| 1970 | } |
| 1971 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1972 | cc_defaults { |
| 1973 | name: "crt_defaults", |
Dan Willemsen | 7ec52b1 | 2016-11-28 17:02:25 -0800 | [diff] [blame] | 1974 | defaults: ["linux_bionic_supported"], |
Dan Willemsen | 230a7a4 | 2017-04-07 14:09:05 -0700 | [diff] [blame] | 1975 | vendor_available: true, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1976 | |
Colin Cross | 7d7b368 | 2017-11-03 13:38:40 -0700 | [diff] [blame] | 1977 | cflags: ["-Wno-gcc-compat", "-Wall", "-Werror"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1978 | } |
| 1979 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1980 | cc_defaults { |
| 1981 | name: "crt_so_defaults", |
Colin Cross | 7d7b368 | 2017-11-03 13:38:40 -0700 | [diff] [blame] | 1982 | defaults: ["crt_defaults"], |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1983 | |
| 1984 | arch: { |
| 1985 | mips: { |
| 1986 | cflags: ["-fPIC"], |
| 1987 | }, |
| 1988 | mips64: { |
| 1989 | cflags: ["-fPIC"], |
| 1990 | }, |
| 1991 | x86: { |
| 1992 | cflags: ["-fPIC"], |
| 1993 | }, |
| 1994 | x86_64: { |
| 1995 | cflags: ["-fPIC"], |
| 1996 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1997 | }, |
| 1998 | } |
| 1999 | |
Dan Willemsen | a3ed901 | 2017-04-04 15:51:26 -0700 | [diff] [blame] | 2000 | // crt obj files |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2001 | cc_object { |
| 2002 | name: "crtbrand", |
Dan Willemsen | a3ed901 | 2017-04-04 15:51:26 -0700 | [diff] [blame] | 2003 | // crtbrand.c needs <stdint.h> and a #define for the platform SDK version. |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2004 | local_include_dirs: ["include"], |
| 2005 | product_variables: { |
| 2006 | platform_sdk_version: { |
| 2007 | asflags: ["-DPLATFORM_SDK_VERSION=%d"], |
| 2008 | }, |
| 2009 | }, |
| 2010 | srcs: ["arch-common/bionic/crtbrand.S"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2011 | |
Colin Cross | 7d7b368 | 2017-11-03 13:38:40 -0700 | [diff] [blame] | 2012 | defaults: ["crt_so_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2013 | } |
| 2014 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2015 | cc_object { |
| 2016 | name: "crtbegin_so1", |
| 2017 | local_include_dirs: ["include"], |
| 2018 | srcs: ["arch-common/bionic/crtbegin_so.c"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2019 | |
Colin Cross | 7d7b368 | 2017-11-03 13:38:40 -0700 | [diff] [blame] | 2020 | defaults: ["crt_so_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2021 | } |
| 2022 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2023 | cc_object { |
| 2024 | name: "crtbegin_so", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2025 | |
Colin Cross | 7d7b368 | 2017-11-03 13:38:40 -0700 | [diff] [blame] | 2026 | defaults: ["crt_so_defaults"], |
Colin Cross | 77d57bf | 2016-04-11 14:34:18 -0700 | [diff] [blame] | 2027 | objs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2028 | "crtbegin_so1", |
| 2029 | "crtbrand", |
| 2030 | ], |
| 2031 | } |
| 2032 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2033 | cc_object { |
| 2034 | name: "crtend_so", |
| 2035 | local_include_dirs: ["include"], |
| 2036 | srcs: ["arch-common/bionic/crtend_so.S"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2037 | |
Colin Cross | 7d7b368 | 2017-11-03 13:38:40 -0700 | [diff] [blame] | 2038 | defaults: ["crt_so_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2039 | } |
| 2040 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2041 | cc_object { |
| 2042 | name: "crtbegin_static1", |
| 2043 | local_include_dirs: ["include"], |
| 2044 | srcs: ["arch-common/bionic/crtbegin.c"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2045 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2046 | arch: { |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2047 | mips: { |
| 2048 | srcs: [ |
| 2049 | "arch-mips/bionic/crtbegin.c", |
| 2050 | ], |
| 2051 | exclude_srcs: [ |
| 2052 | "arch-common/bionic/crtbegin.c", |
| 2053 | ], |
| 2054 | }, |
| 2055 | mips64: { |
| 2056 | srcs: [ |
| 2057 | "arch-mips64/bionic/crtbegin.c", |
| 2058 | ], |
| 2059 | exclude_srcs: [ |
| 2060 | "arch-common/bionic/crtbegin.c", |
| 2061 | ], |
| 2062 | }, |
| 2063 | }, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2064 | |
| 2065 | defaults: ["crt_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2066 | } |
| 2067 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2068 | cc_object { |
| 2069 | name: "crtbegin_static", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2070 | |
Colin Cross | 77d57bf | 2016-04-11 14:34:18 -0700 | [diff] [blame] | 2071 | objs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2072 | "crtbegin_static1", |
| 2073 | "crtbrand", |
| 2074 | ], |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2075 | defaults: ["crt_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2076 | } |
| 2077 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2078 | cc_object { |
| 2079 | name: "crtbegin_dynamic1", |
| 2080 | local_include_dirs: ["include"], |
| 2081 | srcs: ["arch-common/bionic/crtbegin.c"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2082 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2083 | arch: { |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2084 | mips: { |
| 2085 | srcs: [ |
| 2086 | "arch-mips/bionic/crtbegin.c", |
| 2087 | ], |
| 2088 | exclude_srcs: [ |
| 2089 | "arch-common/bionic/crtbegin.c", |
| 2090 | ], |
| 2091 | }, |
| 2092 | mips64: { |
| 2093 | srcs: [ |
| 2094 | "arch-mips64/bionic/crtbegin.c", |
| 2095 | ], |
| 2096 | exclude_srcs: [ |
| 2097 | "arch-common/bionic/crtbegin.c", |
| 2098 | ], |
| 2099 | }, |
| 2100 | }, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2101 | defaults: ["crt_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2102 | } |
| 2103 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2104 | cc_object { |
| 2105 | name: "crtbegin_dynamic", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2106 | |
Colin Cross | 77d57bf | 2016-04-11 14:34:18 -0700 | [diff] [blame] | 2107 | objs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2108 | "crtbegin_dynamic1", |
| 2109 | "crtbrand", |
| 2110 | ], |
Dan Willemsen | 7ccc50d | 2017-09-18 21:28:14 -0700 | [diff] [blame] | 2111 | target: { |
| 2112 | linux_bionic: { |
| 2113 | generated_sources: ["host_bionic_linker_asm"], |
| 2114 | objs: [ |
| 2115 | "linker_wrapper", |
| 2116 | ], |
| 2117 | }, |
| 2118 | }, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2119 | defaults: ["crt_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2120 | } |
| 2121 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2122 | cc_object { |
| 2123 | // We rename crtend.o to crtend_android.o to avoid a |
| 2124 | // name clash between gcc and bionic. |
| 2125 | name: "crtend_android", |
| 2126 | local_include_dirs: ["include"], |
| 2127 | srcs: ["arch-common/bionic/crtend.S"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2128 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2129 | defaults: ["crt_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2130 | } |
Colin Cross | baa4899 | 2016-07-13 11:15:21 -0700 | [diff] [blame] | 2131 | |
Dan Albert | 22805ea | 2017-03-22 15:28:05 -0700 | [diff] [blame] | 2132 | preprocessed_ndk_headers { |
| 2133 | name: "common_libc", |
| 2134 | from: "include", |
| 2135 | to: "", |
| 2136 | license: "NOTICE", |
| 2137 | } |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2138 | |
| 2139 | ndk_headers { |
Dan Albert | 063e86a | 2016-11-29 11:09:12 -0800 | [diff] [blame] | 2140 | name: "libc_uapi", |
| 2141 | from: "kernel/uapi", |
| 2142 | to: "", |
| 2143 | srcs: [ |
| 2144 | "kernel/uapi/asm-generic/**/*.h", |
| 2145 | "kernel/uapi/drm/**/*.h", |
| 2146 | "kernel/uapi/linux/**/*.h", |
| 2147 | "kernel/uapi/misc/**/*.h", |
| 2148 | "kernel/uapi/mtd/**/*.h", |
| 2149 | "kernel/uapi/rdma/**/*.h", |
| 2150 | "kernel/uapi/scsi/**/*.h", |
| 2151 | "kernel/uapi/sound/**/*.h", |
| 2152 | "kernel/uapi/video/**/*.h", |
| 2153 | "kernel/uapi/xen/**/*.h", |
| 2154 | ], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2155 | license: "NOTICE", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2156 | } |
| 2157 | |
| 2158 | ndk_headers { |
Elliott Hughes | 2fad0d5 | 2017-04-27 16:26:55 -0700 | [diff] [blame] | 2159 | name: "libc_kernel_android_uapi_linux", |
Dan Albert | bae16ef | 2016-09-14 17:15:48 -0700 | [diff] [blame] | 2160 | from: "kernel/android/uapi/linux", |
| 2161 | to: "linux", |
| 2162 | srcs: ["kernel/android/uapi/linux/**/*.h"], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2163 | license: "NOTICE", |
Dan Albert | bae16ef | 2016-09-14 17:15:48 -0700 | [diff] [blame] | 2164 | } |
| 2165 | |
| 2166 | ndk_headers { |
Elliott Hughes | 2fad0d5 | 2017-04-27 16:26:55 -0700 | [diff] [blame] | 2167 | name: "libc_kernel_android_scsi", |
Elliott Hughes | 5059939 | 2017-05-25 17:13:32 -0700 | [diff] [blame] | 2168 | from: "kernel/android/scsi/scsi", |
Elliott Hughes | 2fad0d5 | 2017-04-27 16:26:55 -0700 | [diff] [blame] | 2169 | to: "scsi", |
| 2170 | srcs: ["kernel/android/scsi/**/*.h"], |
| 2171 | license: "NOTICE", |
| 2172 | } |
| 2173 | |
| 2174 | ndk_headers { |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2175 | name: "libc_asm_arm", |
| 2176 | from: "kernel/uapi/asm-arm", |
| 2177 | to: "arm-linux-androideabi", |
| 2178 | srcs: ["kernel/uapi/asm-arm/**/*.h"], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2179 | license: "NOTICE", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2180 | } |
| 2181 | |
| 2182 | ndk_headers { |
| 2183 | name: "libc_asm_arm64", |
| 2184 | from: "kernel/uapi/asm-arm64", |
| 2185 | to: "aarch64-linux-android", |
| 2186 | srcs: ["kernel/uapi/asm-arm64/**/*.h"], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2187 | license: "NOTICE", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2188 | } |
| 2189 | |
| 2190 | ndk_headers { |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2191 | name: "libc_asm_x86", |
| 2192 | from: "kernel/uapi/asm-x86", |
| 2193 | to: "i686-linux-android", |
| 2194 | srcs: ["kernel/uapi/asm-x86/**/*.h"], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2195 | license: "NOTICE", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2196 | } |
| 2197 | |
| 2198 | ndk_headers { |
| 2199 | name: "libc_asm_x86_64", |
| 2200 | from: "kernel/uapi/asm-x86", |
| 2201 | to: "x86_64-linux-android", |
| 2202 | srcs: ["kernel/uapi/asm-x86/**/*.h"], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2203 | license: "NOTICE", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2204 | } |
| 2205 | |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2206 | ndk_library { |
Dan Willemsen | 51a9bf1 | 2017-04-07 14:09:18 -0700 | [diff] [blame] | 2207 | name: "libc", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2208 | symbol_file: "libc.map.txt", |
| 2209 | first_version: "9", |
| 2210 | } |
| 2211 | |
Dan Willemsen | b8f7fde | 2017-03-20 14:07:47 -0700 | [diff] [blame] | 2212 | llndk_library { |
Dan Willemsen | 51a9bf1 | 2017-04-07 14:09:18 -0700 | [diff] [blame] | 2213 | name: "libc", |
Dan Willemsen | b8f7fde | 2017-03-20 14:07:47 -0700 | [diff] [blame] | 2214 | symbol_file: "libc.map.txt", |
| 2215 | export_headers_as_system: true, |
| 2216 | export_preprocessed_headers: ["include"], |
| 2217 | arch: { |
| 2218 | arm: { |
| 2219 | export_include_dirs: [ |
Dan Willemsen | b8f7fde | 2017-03-20 14:07:47 -0700 | [diff] [blame] | 2220 | "kernel/uapi", |
| 2221 | "kernel/uapi/asm-arm", |
| 2222 | "kernel/android/uapi", |
| 2223 | ], |
| 2224 | }, |
| 2225 | arm64: { |
| 2226 | export_include_dirs: [ |
Dan Willemsen | b8f7fde | 2017-03-20 14:07:47 -0700 | [diff] [blame] | 2227 | "kernel/uapi", |
| 2228 | "kernel/uapi/asm-arm64", |
| 2229 | "kernel/android/uapi", |
| 2230 | ], |
| 2231 | }, |
| 2232 | mips: { |
| 2233 | export_include_dirs: [ |
Dan Willemsen | b8f7fde | 2017-03-20 14:07:47 -0700 | [diff] [blame] | 2234 | "kernel/uapi", |
| 2235 | "kernel/uapi/asm-mips", |
| 2236 | "kernel/android/uapi", |
| 2237 | ], |
| 2238 | }, |
| 2239 | mips64: { |
| 2240 | export_include_dirs: [ |
Dan Willemsen | b8f7fde | 2017-03-20 14:07:47 -0700 | [diff] [blame] | 2241 | "kernel/uapi", |
| 2242 | "kernel/uapi/asm-mips", |
| 2243 | "kernel/android/uapi", |
| 2244 | ], |
| 2245 | }, |
| 2246 | x86: { |
| 2247 | export_include_dirs: [ |
Dan Willemsen | b8f7fde | 2017-03-20 14:07:47 -0700 | [diff] [blame] | 2248 | "kernel/uapi", |
| 2249 | "kernel/uapi/asm-x86", |
| 2250 | "kernel/android/uapi", |
| 2251 | ], |
| 2252 | }, |
| 2253 | x86_64: { |
| 2254 | export_include_dirs: [ |
Dan Willemsen | b8f7fde | 2017-03-20 14:07:47 -0700 | [diff] [blame] | 2255 | "kernel/uapi", |
| 2256 | "kernel/uapi/asm-x86", |
| 2257 | "kernel/android/uapi", |
| 2258 | ], |
| 2259 | }, |
| 2260 | }, |
| 2261 | } |
| 2262 | |
Dan Albert | df31aff | 2016-10-06 15:50:41 -0700 | [diff] [blame] | 2263 | ndk_library { |
Dan Willemsen | 51a9bf1 | 2017-04-07 14:09:18 -0700 | [diff] [blame] | 2264 | name: "libstdc++", |
Dan Albert | df31aff | 2016-10-06 15:50:41 -0700 | [diff] [blame] | 2265 | symbol_file: "libstdc++.map.txt", |
| 2266 | first_version: "9", |
| 2267 | } |
| 2268 | |
Elliott Hughes | 926add1 | 2017-03-02 18:56:12 -0800 | [diff] [blame] | 2269 | subdirs = ["*"] |