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