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