1 LOCAL_PATH := $(call my-dir)
3 bionic_coverage ?= false
5 # Make everything depend on any changes to included makefiles.
6 libc_common_additional_dependencies := $(LOCAL_PATH)/Android.mk
8 # Load config for TARGET_ARCH
10 include $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
11 libc_common_additional_dependencies += \
12 $(LOCAL_PATH)/arch-$(TARGET_ARCH)/$(TARGET_ARCH).mk
16 # Load config for TARGET_2ND_ARCH
17 my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
18 include $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk
20 libc_common_additional_dependencies += \
21 $(LOCAL_PATH)/arch-$(TARGET_2ND_ARCH)/$(TARGET_2ND_ARCH).mk
25 # ========================================================
26 # crtbrand.c needs <stdint.h> and a #define for the platform SDK version.
27 libc_crt_target_cflags := \
28 -I$(LOCAL_PATH)/include \
29 -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) \
32 include $(LOCAL_PATH)/crt.mk
34 my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
35 include $(LOCAL_PATH)/crt.mk
39 # Define the common source files for all the libc instances
40 # =========================================================
41 libc_common_src_files := \
42 bionic/bindresvport.c \
46 bionic/getpriority.c \
51 bionic/sched_cpualloc.c \
52 bionic/sched_cpucount.c \
54 bionic/siginterrupt.c \
56 bionic/system_properties_compat.c \
67 # Fortify implementations of libc functions.
68 libc_common_src_files += \
70 bionic/__fgets_chk.cpp \
71 bionic/__fread_chk.cpp \
72 bionic/__fwrite_chk.cpp \
73 bionic/__getcwd_chk.cpp \
74 bionic/__memchr_chk.cpp \
75 bionic/__memmove_chk.cpp \
76 bionic/__memrchr_chk.cpp \
77 bionic/__poll_chk.cpp \
78 bionic/__pread64_chk.cpp \
79 bionic/__pread_chk.cpp \
80 bionic/__pwrite64_chk.cpp \
81 bionic/__pwrite_chk.cpp \
82 bionic/__read_chk.cpp \
83 bionic/__readlink_chk.cpp \
84 bionic/__readlinkat_chk.cpp \
85 bionic/__recvfrom_chk.cpp \
86 bionic/__stpcpy_chk.cpp \
87 bionic/__stpncpy_chk.cpp \
88 bionic/__strchr_chk.cpp \
89 bionic/__strlcat_chk.cpp \
90 bionic/__strlcpy_chk.cpp \
91 bionic/__strlen_chk.cpp \
92 bionic/__strncat_chk.cpp \
93 bionic/__strncpy_chk.cpp \
94 bionic/__strrchr_chk.cpp \
95 bionic/__umask_chk.cpp \
96 bionic/__vsnprintf_chk.cpp \
97 bionic/__vsprintf_chk.cpp \
98 bionic/__write_chk.cpp
100 libc_bionic_ndk_src_files := \
105 bionic/arpa_inet.cpp \
108 bionic/bionic_netlink.cpp \
109 bionic/bionic_systrace.cpp \
110 bionic/bionic_time_conversions.cpp \
112 bionic/c16rtomb.cpp \
113 bionic/c32rtomb.cpp \
116 bionic/clearenv.cpp \
118 bionic/clock_getcpuclockid.cpp \
119 bionic/clock_nanosleep.cpp \
122 bionic/__cmsg_nxthdr.cpp \
127 bionic/epoll_create.cpp \
128 bionic/epoll_pwait.cpp \
129 bionic/epoll_wait.cpp \
132 bionic/eventfd_read.cpp \
133 bionic/eventfd_write.cpp \
134 bionic/faccessat.cpp \
136 bionic/fchmodat.cpp \
138 bionic/fgetxattr.cpp \
139 bionic/flistxattr.cpp \
140 bionic/flockfile.cpp \
141 bionic/fpclassify.cpp \
142 bionic/fsetxattr.cpp \
143 bionic/ftruncate.cpp \
144 bionic/futimens.cpp \
146 bionic/gethostname.cpp \
150 bionic/__gnu_basename.cpp \
152 bionic/inotify_init.cpp \
155 bionic/lfs64_support.cpp \
156 bionic/__libc_current_sigrtmax.cpp \
157 bionic/__libc_current_sigrtmin.cpp \
158 bionic/libc_init_common.cpp \
159 bionic/libc_logging.cpp \
164 bionic/malloc_info.cpp \
165 bionic/mbrtoc16.cpp \
166 bionic/mbrtoc32.cpp \
174 bionic/NetdClientDispatch.cpp \
177 bionic/pathconf.cpp \
181 bionic/posix_fadvise.cpp \
182 bionic/posix_fallocate.cpp \
183 bionic/posix_madvise.cpp \
184 bionic/posix_timers.cpp \
189 bionic/readlink.cpp \
195 bionic/sched_getaffinity.cpp \
196 bionic/sched_getcpu.cpp \
197 bionic/semaphore.cpp \
200 bionic/__set_errno.cpp \
203 bionic/sigaction.cpp \
204 bionic/sigaddset.cpp \
205 bionic/sigdelset.cpp \
206 bionic/sigemptyset.cpp \
207 bionic/sigfillset.cpp \
208 bionic/sigismember.cpp \
210 bionic/signalfd.cpp \
211 bionic/sigpending.cpp \
212 bionic/sigprocmask.cpp \
213 bionic/sigqueue.cpp \
214 bionic/sigsuspend.cpp \
215 bionic/sigtimedwait.cpp \
217 bionic/sigwaitinfo.cpp \
221 bionic/strchrnul.cpp \
222 bionic/strerror.cpp \
223 bionic/strerror_r.cpp \
224 bionic/strsignal.cpp \
230 bionic/sys_siglist.c \
231 bionic/sys_signame.c \
232 bionic/system_properties.cpp \
233 bionic/tdestroy.cpp \
235 bionic/thread_private.cpp \
243 bionic/wmempcpy.cpp \
245 libc_bionic_src_files :=
247 # The following implementations depend on pthread data, so we can't include
248 # them in libc_ndk.a.
249 libc_bionic_src_files += \
250 bionic/__cxa_thread_atexit_impl.cpp \
253 # The data that backs getauxval is initialized in the libc init functions which
254 # are invoked by the linker. If this file is included in libc_ndk.a, only one of
255 # the copies of the global data will be initialized, resulting in nullptr
257 libc_bionic_src_files += bionic/getauxval.cpp
259 # These four require getauxval, which isn't available on older platforms.
260 libc_bionic_src_files += bionic/getentropy_linux.c
261 libc_bionic_src_files += bionic/sysconf.cpp
262 libc_bionic_src_files += bionic/vdso.cpp
263 libc_bionic_src_files += bionic/setjmp_cookie.cpp
265 libc_bionic_src_files += \
266 bionic/__memcpy_chk.cpp \
267 bionic/__memset_chk.cpp \
268 bionic/__strcat_chk.cpp \
269 bionic/__strcpy_chk.cpp \
274 libc_cxa_src_files := \
275 bionic/__cxa_guard.cpp \
276 bionic/__cxa_pure_virtual.cpp \
279 libc_upstream_freebsd_src_files := \
280 upstream-freebsd/lib/libc/gen/ldexp.c \
281 upstream-freebsd/lib/libc/gen/sleep.c \
282 upstream-freebsd/lib/libc/gen/usleep.c \
283 upstream-freebsd/lib/libc/stdlib/getopt_long.c \
284 upstream-freebsd/lib/libc/stdlib/qsort.c \
285 upstream-freebsd/lib/libc/stdlib/quick_exit.c \
286 upstream-freebsd/lib/libc/stdlib/realpath.c \
287 upstream-freebsd/lib/libc/string/wcpcpy.c \
288 upstream-freebsd/lib/libc/string/wcpncpy.c \
289 upstream-freebsd/lib/libc/string/wcscasecmp.c \
290 upstream-freebsd/lib/libc/string/wcscat.c \
291 upstream-freebsd/lib/libc/string/wcschr.c \
292 upstream-freebsd/lib/libc/string/wcscmp.c \
293 upstream-freebsd/lib/libc/string/wcscpy.c \
294 upstream-freebsd/lib/libc/string/wcscspn.c \
295 upstream-freebsd/lib/libc/string/wcsdup.c \
296 upstream-freebsd/lib/libc/string/wcslcat.c \
297 upstream-freebsd/lib/libc/string/wcslen.c \
298 upstream-freebsd/lib/libc/string/wcsncasecmp.c \
299 upstream-freebsd/lib/libc/string/wcsncat.c \
300 upstream-freebsd/lib/libc/string/wcsncmp.c \
301 upstream-freebsd/lib/libc/string/wcsncpy.c \
302 upstream-freebsd/lib/libc/string/wcsnlen.c \
303 upstream-freebsd/lib/libc/string/wcspbrk.c \
304 upstream-freebsd/lib/libc/string/wcsrchr.c \
305 upstream-freebsd/lib/libc/string/wcsspn.c \
306 upstream-freebsd/lib/libc/string/wcstok.c \
307 upstream-freebsd/lib/libc/string/wmemchr.c \
308 upstream-freebsd/lib/libc/string/wmemcmp.c \
309 upstream-freebsd/lib/libc/string/wmemmove.c \
310 upstream-freebsd/lib/libc/string/wmemset.c \
312 libc_upstream_netbsd_src_files := \
313 upstream-netbsd/common/lib/libc/stdlib/random.c \
314 upstream-netbsd/lib/libc/gen/ftw.c \
315 upstream-netbsd/lib/libc/gen/nftw.c \
316 upstream-netbsd/lib/libc/gen/nice.c \
317 upstream-netbsd/lib/libc/gen/popen.c \
318 upstream-netbsd/lib/libc/gen/psignal.c \
319 upstream-netbsd/lib/libc/gen/utime.c \
320 upstream-netbsd/lib/libc/gen/utmp.c \
321 upstream-netbsd/lib/libc/inet/nsap_addr.c \
322 upstream-netbsd/lib/libc/regex/regcomp.c \
323 upstream-netbsd/lib/libc/regex/regerror.c \
324 upstream-netbsd/lib/libc/regex/regexec.c \
325 upstream-netbsd/lib/libc/regex/regfree.c \
326 upstream-netbsd/lib/libc/stdlib/bsearch.c \
327 upstream-netbsd/lib/libc/stdlib/div.c \
328 upstream-netbsd/lib/libc/stdlib/drand48.c \
329 upstream-netbsd/lib/libc/stdlib/erand48.c \
330 upstream-netbsd/lib/libc/stdlib/jrand48.c \
331 upstream-netbsd/lib/libc/stdlib/lcong48.c \
332 upstream-netbsd/lib/libc/stdlib/ldiv.c \
333 upstream-netbsd/lib/libc/stdlib/lldiv.c \
334 upstream-netbsd/lib/libc/stdlib/lrand48.c \
335 upstream-netbsd/lib/libc/stdlib/mrand48.c \
336 upstream-netbsd/lib/libc/stdlib/nrand48.c \
337 upstream-netbsd/lib/libc/stdlib/_rand48.c \
338 upstream-netbsd/lib/libc/stdlib/rand_r.c \
339 upstream-netbsd/lib/libc/stdlib/reallocarr.c \
340 upstream-netbsd/lib/libc/stdlib/seed48.c \
341 upstream-netbsd/lib/libc/stdlib/srand48.c \
342 upstream-netbsd/lib/libc/string/memccpy.c \
343 upstream-netbsd/lib/libc/string/strcasestr.c \
344 upstream-netbsd/lib/libc/string/strcoll.c \
345 upstream-netbsd/lib/libc/string/strxfrm.c \
347 libc_upstream_openbsd_gdtoa_src_files := \
348 upstream-openbsd/android/gdtoa_support.cpp \
349 upstream-openbsd/lib/libc/gdtoa/dmisc.c \
350 upstream-openbsd/lib/libc/gdtoa/dtoa.c \
351 upstream-openbsd/lib/libc/gdtoa/gdtoa.c \
352 upstream-openbsd/lib/libc/gdtoa/gethex.c \
353 upstream-openbsd/lib/libc/gdtoa/gmisc.c \
354 upstream-openbsd/lib/libc/gdtoa/hd_init.c \
355 upstream-openbsd/lib/libc/gdtoa/hdtoa.c \
356 upstream-openbsd/lib/libc/gdtoa/hexnan.c \
357 upstream-openbsd/lib/libc/gdtoa/ldtoa.c \
358 upstream-openbsd/lib/libc/gdtoa/misc.c \
359 upstream-openbsd/lib/libc/gdtoa/smisc.c \
360 upstream-openbsd/lib/libc/gdtoa/strtod.c \
361 upstream-openbsd/lib/libc/gdtoa/strtodg.c \
362 upstream-openbsd/lib/libc/gdtoa/strtof.c \
363 upstream-openbsd/lib/libc/gdtoa/strtord.c \
364 upstream-openbsd/lib/libc/gdtoa/sum.c \
365 upstream-openbsd/lib/libc/gdtoa/ulp.c \
367 libc_upstream_openbsd_gdtoa_src_files_32 := \
368 $(libc_upstream_openbsd_gdtoa_src_files) \
370 libc_upstream_openbsd_gdtoa_src_files_64 := \
371 $(libc_upstream_openbsd_gdtoa_src_files) \
372 upstream-openbsd/lib/libc/gdtoa/strtorQ.c \
374 # These two depend on getentropy_linux.c, which isn't in libc_ndk.a.
375 libc_upstream_openbsd_src_files := \
376 upstream-openbsd/lib/libc/crypt/arc4random.c \
377 upstream-openbsd/lib/libc/crypt/arc4random_uniform.c \
379 libc_upstream_openbsd_src_files += \
380 upstream-openbsd/lib/libc/string/memchr.c \
381 upstream-openbsd/lib/libc/string/memmove.c \
382 upstream-openbsd/lib/libc/string/memrchr.c \
383 upstream-openbsd/lib/libc/string/stpcpy.c \
384 upstream-openbsd/lib/libc/string/stpncpy.c \
385 upstream-openbsd/lib/libc/string/strcat.c \
386 upstream-openbsd/lib/libc/string/strcpy.c \
387 upstream-openbsd/lib/libc/string/strlcat.c \
388 upstream-openbsd/lib/libc/string/strlcpy.c \
389 upstream-openbsd/lib/libc/string/strncat.c \
390 upstream-openbsd/lib/libc/string/strncmp.c \
391 upstream-openbsd/lib/libc/string/strncpy.c \
393 libc_upstream_openbsd_ndk_src_files := \
394 upstream-openbsd/lib/libc/compat-43/killpg.c \
395 upstream-openbsd/lib/libc/gen/alarm.c \
396 upstream-openbsd/lib/libc/gen/ctype_.c \
397 upstream-openbsd/lib/libc/gen/daemon.c \
398 upstream-openbsd/lib/libc/gen/err.c \
399 upstream-openbsd/lib/libc/gen/errx.c \
400 upstream-openbsd/lib/libc/gen/exec.c \
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 \
406 upstream-openbsd/lib/libc/gen/time.c \
407 upstream-openbsd/lib/libc/gen/tolower_.c \
408 upstream-openbsd/lib/libc/gen/toupper_.c \
409 upstream-openbsd/lib/libc/gen/verr.c \
410 upstream-openbsd/lib/libc/gen/verrx.c \
411 upstream-openbsd/lib/libc/gen/vwarn.c \
412 upstream-openbsd/lib/libc/gen/vwarnx.c \
413 upstream-openbsd/lib/libc/gen/warn.c \
414 upstream-openbsd/lib/libc/gen/warnx.c \
415 upstream-openbsd/lib/libc/locale/btowc.c \
416 upstream-openbsd/lib/libc/locale/mbrlen.c \
417 upstream-openbsd/lib/libc/locale/mbstowcs.c \
418 upstream-openbsd/lib/libc/locale/mbtowc.c \
419 upstream-openbsd/lib/libc/locale/wcscoll.c \
420 upstream-openbsd/lib/libc/locale/wcstod.c \
421 upstream-openbsd/lib/libc/locale/wcstof.c \
422 upstream-openbsd/lib/libc/locale/wcstoimax.c \
423 upstream-openbsd/lib/libc/locale/wcstol.c \
424 upstream-openbsd/lib/libc/locale/wcstold.c \
425 upstream-openbsd/lib/libc/locale/wcstoll.c \
426 upstream-openbsd/lib/libc/locale/wcstombs.c \
427 upstream-openbsd/lib/libc/locale/wcstoul.c \
428 upstream-openbsd/lib/libc/locale/wcstoull.c \
429 upstream-openbsd/lib/libc/locale/wcstoumax.c \
430 upstream-openbsd/lib/libc/locale/wcsxfrm.c \
431 upstream-openbsd/lib/libc/locale/wctob.c \
432 upstream-openbsd/lib/libc/locale/wctomb.c \
433 upstream-openbsd/lib/libc/net/htonl.c \
434 upstream-openbsd/lib/libc/net/htons.c \
435 upstream-openbsd/lib/libc/net/inet_lnaof.c \
436 upstream-openbsd/lib/libc/net/inet_makeaddr.c \
437 upstream-openbsd/lib/libc/net/inet_netof.c \
438 upstream-openbsd/lib/libc/net/inet_ntoa.c \
439 upstream-openbsd/lib/libc/net/inet_ntop.c \
440 upstream-openbsd/lib/libc/net/inet_pton.c \
441 upstream-openbsd/lib/libc/net/ntohl.c \
442 upstream-openbsd/lib/libc/net/ntohs.c \
443 upstream-openbsd/lib/libc/net/res_random.c \
444 upstream-openbsd/lib/libc/stdio/asprintf.c \
445 upstream-openbsd/lib/libc/stdio/clrerr.c \
446 upstream-openbsd/lib/libc/stdio/dprintf.c \
447 upstream-openbsd/lib/libc/stdio/fclose.c \
448 upstream-openbsd/lib/libc/stdio/fdopen.c \
449 upstream-openbsd/lib/libc/stdio/feof.c \
450 upstream-openbsd/lib/libc/stdio/ferror.c \
451 upstream-openbsd/lib/libc/stdio/fflush.c \
452 upstream-openbsd/lib/libc/stdio/fgetc.c \
453 upstream-openbsd/lib/libc/stdio/fgetln.c \
454 upstream-openbsd/lib/libc/stdio/fgetpos.c \
455 upstream-openbsd/lib/libc/stdio/fgets.c \
456 upstream-openbsd/lib/libc/stdio/fgetwc.c \
457 upstream-openbsd/lib/libc/stdio/fgetws.c \
458 upstream-openbsd/lib/libc/stdio/fileno.c \
459 upstream-openbsd/lib/libc/stdio/flags.c \
460 upstream-openbsd/lib/libc/stdio/fmemopen.c \
461 upstream-openbsd/lib/libc/stdio/fopen.c \
462 upstream-openbsd/lib/libc/stdio/fprintf.c \
463 upstream-openbsd/lib/libc/stdio/fpurge.c \
464 upstream-openbsd/lib/libc/stdio/fputc.c \
465 upstream-openbsd/lib/libc/stdio/fputs.c \
466 upstream-openbsd/lib/libc/stdio/fputwc.c \
467 upstream-openbsd/lib/libc/stdio/fputws.c \
468 upstream-openbsd/lib/libc/stdio/freopen.c \
469 upstream-openbsd/lib/libc/stdio/fscanf.c \
470 upstream-openbsd/lib/libc/stdio/fseek.c \
471 upstream-openbsd/lib/libc/stdio/fsetpos.c \
472 upstream-openbsd/lib/libc/stdio/ftell.c \
473 upstream-openbsd/lib/libc/stdio/funopen.c \
474 upstream-openbsd/lib/libc/stdio/fvwrite.c \
475 upstream-openbsd/lib/libc/stdio/fwalk.c \
476 upstream-openbsd/lib/libc/stdio/fwide.c \
477 upstream-openbsd/lib/libc/stdio/fwprintf.c \
478 upstream-openbsd/lib/libc/stdio/fwrite.c \
479 upstream-openbsd/lib/libc/stdio/fwscanf.c \
480 upstream-openbsd/lib/libc/stdio/getc.c \
481 upstream-openbsd/lib/libc/stdio/getchar.c \
482 upstream-openbsd/lib/libc/stdio/getdelim.c \
483 upstream-openbsd/lib/libc/stdio/getline.c \
484 upstream-openbsd/lib/libc/stdio/gets.c \
485 upstream-openbsd/lib/libc/stdio/getwc.c \
486 upstream-openbsd/lib/libc/stdio/getwchar.c \
487 upstream-openbsd/lib/libc/stdio/makebuf.c \
488 upstream-openbsd/lib/libc/stdio/mktemp.c \
489 upstream-openbsd/lib/libc/stdio/open_memstream.c \
490 upstream-openbsd/lib/libc/stdio/open_wmemstream.c \
491 upstream-openbsd/lib/libc/stdio/perror.c \
492 upstream-openbsd/lib/libc/stdio/printf.c \
493 upstream-openbsd/lib/libc/stdio/putc.c \
494 upstream-openbsd/lib/libc/stdio/putchar.c \
495 upstream-openbsd/lib/libc/stdio/puts.c \
496 upstream-openbsd/lib/libc/stdio/putwc.c \
497 upstream-openbsd/lib/libc/stdio/putwchar.c \
498 upstream-openbsd/lib/libc/stdio/remove.c \
499 upstream-openbsd/lib/libc/stdio/rewind.c \
500 upstream-openbsd/lib/libc/stdio/rget.c \
501 upstream-openbsd/lib/libc/stdio/scanf.c \
502 upstream-openbsd/lib/libc/stdio/setbuf.c \
503 upstream-openbsd/lib/libc/stdio/setbuffer.c \
504 upstream-openbsd/lib/libc/stdio/setvbuf.c \
505 upstream-openbsd/lib/libc/stdio/sscanf.c \
506 upstream-openbsd/lib/libc/stdio/swprintf.c \
507 upstream-openbsd/lib/libc/stdio/swscanf.c \
508 upstream-openbsd/lib/libc/stdio/tempnam.c \
509 upstream-openbsd/lib/libc/stdio/tmpnam.c \
510 upstream-openbsd/lib/libc/stdio/ungetc.c \
511 upstream-openbsd/lib/libc/stdio/ungetwc.c \
512 upstream-openbsd/lib/libc/stdio/vasprintf.c \
513 upstream-openbsd/lib/libc/stdio/vdprintf.c \
514 upstream-openbsd/lib/libc/stdio/vfprintf.c \
515 upstream-openbsd/lib/libc/stdio/vfscanf.c \
516 upstream-openbsd/lib/libc/stdio/vfwprintf.c \
517 upstream-openbsd/lib/libc/stdio/vfwscanf.c \
518 upstream-openbsd/lib/libc/stdio/vprintf.c \
519 upstream-openbsd/lib/libc/stdio/vscanf.c \
520 upstream-openbsd/lib/libc/stdio/vsnprintf.c \
521 upstream-openbsd/lib/libc/stdio/vsprintf.c \
522 upstream-openbsd/lib/libc/stdio/vsscanf.c \
523 upstream-openbsd/lib/libc/stdio/vswprintf.c \
524 upstream-openbsd/lib/libc/stdio/vswscanf.c \
525 upstream-openbsd/lib/libc/stdio/vwprintf.c \
526 upstream-openbsd/lib/libc/stdio/vwscanf.c \
527 upstream-openbsd/lib/libc/stdio/wbuf.c \
528 upstream-openbsd/lib/libc/stdio/wprintf.c \
529 upstream-openbsd/lib/libc/stdio/wscanf.c \
530 upstream-openbsd/lib/libc/stdio/wsetup.c \
531 upstream-openbsd/lib/libc/stdlib/abs.c \
532 upstream-openbsd/lib/libc/stdlib/atoi.c \
533 upstream-openbsd/lib/libc/stdlib/atol.c \
534 upstream-openbsd/lib/libc/stdlib/atoll.c \
535 upstream-openbsd/lib/libc/stdlib/getenv.c \
536 upstream-openbsd/lib/libc/stdlib/insque.c \
537 upstream-openbsd/lib/libc/stdlib/imaxabs.c \
538 upstream-openbsd/lib/libc/stdlib/imaxdiv.c \
539 upstream-openbsd/lib/libc/stdlib/labs.c \
540 upstream-openbsd/lib/libc/stdlib/llabs.c \
541 upstream-openbsd/lib/libc/stdlib/lsearch.c \
542 upstream-openbsd/lib/libc/stdlib/reallocarray.c \
543 upstream-openbsd/lib/libc/stdlib/remque.c \
544 upstream-openbsd/lib/libc/stdlib/setenv.c \
545 upstream-openbsd/lib/libc/stdlib/strtoimax.c \
546 upstream-openbsd/lib/libc/stdlib/strtol.c \
547 upstream-openbsd/lib/libc/stdlib/strtoll.c \
548 upstream-openbsd/lib/libc/stdlib/strtoul.c \
549 upstream-openbsd/lib/libc/stdlib/strtoull.c \
550 upstream-openbsd/lib/libc/stdlib/strtoumax.c \
551 upstream-openbsd/lib/libc/stdlib/system.c \
552 upstream-openbsd/lib/libc/stdlib/tfind.c \
553 upstream-openbsd/lib/libc/stdlib/tsearch.c \
554 upstream-openbsd/lib/libc/string/strcasecmp.c \
555 upstream-openbsd/lib/libc/string/strcspn.c \
556 upstream-openbsd/lib/libc/string/strdup.c \
557 upstream-openbsd/lib/libc/string/strndup.c \
558 upstream-openbsd/lib/libc/string/strpbrk.c \
559 upstream-openbsd/lib/libc/string/strsep.c \
560 upstream-openbsd/lib/libc/string/strspn.c \
561 upstream-openbsd/lib/libc/string/strstr.c \
562 upstream-openbsd/lib/libc/string/strtok.c \
563 upstream-openbsd/lib/libc/string/wmemcpy.c \
564 upstream-openbsd/lib/libc/string/wcslcpy.c \
565 upstream-openbsd/lib/libc/string/wcsstr.c \
566 upstream-openbsd/lib/libc/string/wcswidth.c \
568 libc_pthread_src_files := \
569 bionic/pthread_atfork.cpp \
570 bionic/pthread_attr.cpp \
571 bionic/pthread_barrier.cpp \
572 bionic/pthread_cond.cpp \
573 bionic/pthread_create.cpp \
574 bionic/pthread_detach.cpp \
575 bionic/pthread_equal.cpp \
576 bionic/pthread_exit.cpp \
577 bionic/pthread_getcpuclockid.cpp \
578 bionic/pthread_getschedparam.cpp \
579 bionic/pthread_gettid_np.cpp \
580 bionic/pthread_internal.cpp \
581 bionic/pthread_join.cpp \
582 bionic/pthread_key.cpp \
583 bionic/pthread_kill.cpp \
584 bionic/pthread_mutex.cpp \
585 bionic/pthread_once.cpp \
586 bionic/pthread_rwlock.cpp \
587 bionic/pthread_self.cpp \
588 bionic/pthread_setname_np.cpp \
589 bionic/pthread_setschedparam.cpp \
590 bionic/pthread_sigmask.cpp \
591 bionic/pthread_spinlock.cpp \
593 libc_arch_static_src_files := \
594 bionic/dl_iterate_phdr_static.cpp \
596 # Various kinds of cruft.
597 # ========================================================
598 libc_common_src_files += \
599 bionic/ndk_cruft.cpp \
601 libc_bionic_ndk_src_files_32 += \
604 libc_common_src_files_32 += \
605 bionic/legacy_32_bit_support.cpp \
608 libc_netbsd_src_files_32 += \
609 upstream-netbsd/common/lib/libc/hash/sha1/sha1.c \
611 libc_openbsd_src_files_32 += \
612 upstream-openbsd/lib/libc/stdio/putw.c \
615 # Define some common cflags
616 # ========================================================
617 libc_common_cflags := \
619 -Wall -Wextra -Wunused \
621 use_clang := $(USE_CLANG_PLATFORM_BUILD)
623 # Clang/llvm has incompatible long double (fp128) for x86_64.
624 # https://llvm.org/bugs/show_bug.cgi?id=23897
625 ifeq ($(TARGET_ARCH),x86_64)
629 # b/25291096, Clang/llvm compiled libc.so for mips/mips64 failed to boot.
630 ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64))
638 # Try to catch typical 32-bit assumptions that break with 64-bit pointers.
639 libc_common_cflags += \
640 -Werror=pointer-to-int-cast \
641 -Werror=int-to-pointer-cast \
642 -Werror=type-limits \
645 ifeq ($(strip $(DEBUG_BIONIC_LIBC)),true)
646 libc_common_cflags += -DDEBUG
649 ifeq ($(MALLOC_SVELTE),true)
650 libc_common_cflags += -DUSE_DLMALLOC
651 libc_malloc_src := bionic/dlmalloc.c
653 libc_common_cflags += -DUSE_JEMALLOC
654 libc_malloc_src := bionic/jemalloc_wrapper.cpp
655 libc_common_c_includes += external/jemalloc/include
658 # Define some common conlyflags
659 libc_common_conlyflags := \
662 # Define some common cppflags
663 libc_common_cppflags := \
665 # Define some common includes
666 # ========================================================
667 libc_common_c_includes += \
668 $(LOCAL_PATH)/stdio \
670 # ========================================================
671 # Add in the arch or 32-bit specific flags
672 # Must be called with $(eval).
673 # $(1): the LOCAL_ variable name
674 # $(2): the bionic variable name to pull in
675 define patch-up-arch-specific-flags
676 $(1)_$(TARGET_ARCH) += $($(2)_$(TARGET_ARCH))
677 $(1)_32 += $($(2)_32)
678 ifdef TARGET_2ND_ARCH
679 $(1)_$(TARGET_2ND_ARCH) += $($(2)_$(TARGET_2ND_ARCH))
684 # ========================================================
685 # libc_stack_protector.a - stack protector code
686 # ========================================================
688 # Code that implements the stack protector (or that runs
689 # before TLS has been set up) needs to be compiled with
690 # -fno-stack-protector, since it accesses the stack canary
693 include $(CLEAR_VARS)
696 bionic/__libc_init_main_thread.cpp \
697 bionic/__stack_chk_fail.cpp \
699 LOCAL_SRC_FILES_arm64 := arch-arm64/bionic/__set_tls.c
700 LOCAL_SRC_FILES_x86 := arch-x86/bionic/__set_tls.c
701 LOCAL_SRC_FILES_x86_64 := arch-x86_64/bionic/__set_tls.c
703 LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector
704 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
705 LOCAL_CPPFLAGS := $(libc_common_cppflags)
706 LOCAL_C_INCLUDES := $(libc_common_c_includes)
707 LOCAL_MODULE := libc_stack_protector
708 LOCAL_CLANG := $(use_clang)
709 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
710 LOCAL_CXX_STL := none
711 LOCAL_SYSTEM_SHARED_LIBRARIES :=
712 LOCAL_SANITIZE := never
713 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
715 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
716 include $(BUILD_STATIC_LIBRARY)
719 # libc_init_static.cpp also needs to be built without stack protector,
720 # because it's responsible for setting up TLS for static executables.
721 # This isn't the case for dynamic executables because the dynamic linker
722 # has already set up the main thread's TLS.
724 include $(CLEAR_VARS)
726 LOCAL_SRC_FILES := bionic/libc_init_static.cpp
727 LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector
728 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
729 LOCAL_CPPFLAGS := $(libc_common_cppflags)
730 LOCAL_C_INCLUDES := $(libc_common_c_includes)
731 LOCAL_MODULE := libc_init_static
732 LOCAL_CLANG := $(use_clang)
733 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
734 LOCAL_CXX_STL := none
735 LOCAL_SYSTEM_SHARED_LIBRARIES :=
736 LOCAL_SANITIZE := never
737 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
739 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
740 include $(BUILD_STATIC_LIBRARY)
743 # ========================================================
744 # libc_tzcode.a - upstream 'tzcode' code
745 # ========================================================
747 include $(CLEAR_VARS)
749 LOCAL_SRC_FILES := $(call all-c-files-under,tzcode)
750 # tzcode doesn't include wcsftime, so we use the OpenBSD one.
751 LOCAL_SRC_FILES += upstream-openbsd/lib/libc/time/wcsftime.c
753 LOCAL_CFLAGS := $(libc_common_cflags) \
754 -fvisibility=hidden \
755 -Wno-unused-parameter \
757 # Don't use ridiculous amounts of stack.
758 LOCAL_CFLAGS += -DALL_STATE
759 # Include tzsetwall, timelocal, timegm, time2posix, and posix2time.
760 LOCAL_CFLAGS += -DSTD_INSPIRED
761 # Obviously, we want to be thread-safe.
762 LOCAL_CFLAGS += -DTHREAD_SAFE
763 # The name of the tm_gmtoff field in our struct tm.
764 LOCAL_CFLAGS += -DTM_GMTOFF=tm_gmtoff
765 # Where we store our tzdata.
766 LOCAL_CFLAGS += -DTZDIR=\"/system/usr/share/zoneinfo\"
767 # Include timezone and daylight globals.
768 LOCAL_CFLAGS += -DUSG_COMPAT=1
769 # Use the empty string (instead of " ") as the timezone abbreviation fallback.
770 LOCAL_CFLAGS += -DWILDABBR=\"\"
771 LOCAL_CFLAGS += -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU
772 LOCAL_CFLAGS += -Dlint
774 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
775 LOCAL_CPPFLAGS := $(libc_common_cppflags)
776 LOCAL_C_INCLUDES := $(libc_common_c_includes) $(LOCAL_PATH)/tzcode/
777 LOCAL_MODULE := libc_tzcode
778 LOCAL_CLANG := $(use_clang)
779 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
780 LOCAL_CXX_STL := none
781 LOCAL_SYSTEM_SHARED_LIBRARIES :=
782 LOCAL_SANITIZE := never
783 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
785 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
786 include $(BUILD_STATIC_LIBRARY)
789 # ========================================================
790 # libc_dns.a - modified NetBSD DNS code
791 # ========================================================
793 include $(CLEAR_VARS)
796 $(call all-c-files-under,dns) \
797 upstream-netbsd/lib/libc/isc/ev_streams.c \
798 upstream-netbsd/lib/libc/isc/ev_timers.c \
799 upstream-netbsd/lib/libc/resolv/mtctxres.c \
802 $(libc_common_cflags) \
805 -fvisibility=hidden \
806 -Wno-unused-parameter \
807 -include netbsd-compat.h \
809 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
810 LOCAL_CPPFLAGS := $(libc_common_cppflags)
811 LOCAL_C_INCLUDES := $(libc_common_c_includes) \
812 $(LOCAL_PATH)/dns/include \
813 $(LOCAL_PATH)/private \
814 $(LOCAL_PATH)/upstream-netbsd/lib/libc/include \
815 $(LOCAL_PATH)/upstream-netbsd/android/include \
817 LOCAL_MODULE := libc_dns
818 LOCAL_CLANG := $(use_clang)
819 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
820 LOCAL_CXX_STL := none
821 LOCAL_SYSTEM_SHARED_LIBRARIES :=
822 LOCAL_SANITIZE := never
823 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
825 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
826 include $(BUILD_STATIC_LIBRARY)
829 # ========================================================
830 # libc_freebsd.a - upstream FreeBSD C library code
831 # ========================================================
833 # These files are built with the freebsd-compat.h header file
834 # automatically included.
836 include $(CLEAR_VARS)
838 LOCAL_SRC_FILES := $(libc_upstream_freebsd_src_files)
840 $(libc_common_cflags) \
841 -Wno-sign-compare -Wno-uninitialized \
842 -include freebsd-compat.h \
844 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
845 LOCAL_CPPFLAGS := $(libc_common_cppflags)
846 LOCAL_C_INCLUDES := $(libc_common_c_includes) \
847 $(LOCAL_PATH)/upstream-freebsd/android/include \
848 $(LOCAL_PATH)/upstream-freebsd/lib/libc/include \
850 LOCAL_MODULE := libc_freebsd
851 LOCAL_CLANG := $(use_clang)
852 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
853 LOCAL_CXX_STL := none
854 LOCAL_SYSTEM_SHARED_LIBRARIES :=
855 LOCAL_SANITIZE := never
856 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
858 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
859 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES_EXCLUDE,libc_freebsd_src_files_exclude))
860 include $(BUILD_STATIC_LIBRARY)
863 # ========================================================
864 # libc_netbsd.a - upstream NetBSD C library code
865 # ========================================================
867 # These files are built with the netbsd-compat.h header file
868 # automatically included.
870 include $(CLEAR_VARS)
872 LOCAL_SRC_FILES := $(libc_upstream_netbsd_src_files)
874 $(libc_common_cflags) \
875 -Wno-sign-compare -Wno-uninitialized \
877 -include netbsd-compat.h \
879 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
880 LOCAL_CPPFLAGS := $(libc_common_cppflags)
881 LOCAL_C_INCLUDES := $(libc_common_c_includes) \
882 $(LOCAL_PATH)/upstream-netbsd/android/include \
883 $(LOCAL_PATH)/upstream-netbsd/lib/libc/include \
885 LOCAL_MODULE := libc_netbsd
886 LOCAL_CLANG := $(use_clang)
887 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
888 LOCAL_CXX_STL := none
889 LOCAL_SYSTEM_SHARED_LIBRARIES :=
890 LOCAL_SANITIZE := never
891 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
893 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
894 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_netbsd_src_files))
895 include $(BUILD_STATIC_LIBRARY)
898 # ========================================================
899 # libc_openbsd_ndk.a - upstream OpenBSD C library code
900 # that can be safely included in the libc_ndk.a (doesn't
901 # contain any troublesome global data or constructors).
902 # ========================================================
904 # These files are built with the openbsd-compat.h header file
905 # automatically included.
907 include $(CLEAR_VARS)
909 LOCAL_SRC_FILES := $(libc_upstream_openbsd_ndk_src_files)
910 LOCAL_CLANG := $(use_clang)
913 $(libc_common_cflags) \
916 -Wno-unused-parameter \
917 -include openbsd-compat.h \
919 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
920 LOCAL_CPPFLAGS := $(libc_common_cppflags)
921 LOCAL_C_INCLUDES := $(libc_common_c_includes) \
922 $(LOCAL_PATH)/private \
923 $(LOCAL_PATH)/upstream-openbsd/android/include \
924 $(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
925 $(LOCAL_PATH)/upstream-openbsd/lib/libc/gdtoa/ \
927 LOCAL_MODULE := libc_openbsd_ndk
928 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
929 LOCAL_CXX_STL := none
930 LOCAL_SYSTEM_SHARED_LIBRARIES :=
931 LOCAL_SANITIZE := never
932 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
934 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
935 include $(BUILD_STATIC_LIBRARY)
938 # ========================================================
939 # libc_openbsd.a - upstream OpenBSD C library code
940 # ========================================================
942 # These files are built with the openbsd-compat.h header file
943 # automatically included.
945 include $(CLEAR_VARS)
947 LOCAL_SRC_FILES := $(libc_upstream_openbsd_src_files)
948 LOCAL_CLANG := $(use_clang)
951 $(libc_common_cflags) \
954 -Wno-unused-parameter \
955 -include openbsd-compat.h \
957 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
958 LOCAL_CPPFLAGS := $(libc_common_cppflags)
959 LOCAL_C_INCLUDES := $(libc_common_c_includes) \
960 $(LOCAL_PATH)/private \
961 $(LOCAL_PATH)/upstream-openbsd/android/include \
962 $(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
963 $(LOCAL_PATH)/upstream-openbsd/lib/libc/gdtoa/ \
965 LOCAL_MODULE := libc_openbsd
966 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
967 LOCAL_CXX_STL := none
968 LOCAL_SYSTEM_SHARED_LIBRARIES :=
969 LOCAL_SANITIZE := never
970 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
972 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
973 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_openbsd_src_files))
974 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES_EXCLUDE,libc_openbsd_src_files_exclude))
975 include $(BUILD_STATIC_LIBRARY)
978 # ========================================================
979 # libc_gdtoa.a - upstream OpenBSD C library gdtoa code
980 # ========================================================
982 # These files are built with the openbsd-compat.h header file
983 # automatically included.
985 include $(CLEAR_VARS)
987 LOCAL_SRC_FILES_32 := $(libc_upstream_openbsd_gdtoa_src_files_32)
988 LOCAL_SRC_FILES_64 := $(libc_upstream_openbsd_gdtoa_src_files_64)
989 LOCAL_CLANG := $(use_clang)
992 $(libc_common_cflags) \
993 -Wno-sign-compare -Wno-uninitialized \
994 -fvisibility=hidden \
995 -include openbsd-compat.h \
997 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
998 LOCAL_CPPFLAGS := $(libc_common_cppflags)
999 LOCAL_C_INCLUDES := $(libc_common_c_includes) \
1000 $(LOCAL_PATH)/private \
1001 $(LOCAL_PATH)/upstream-openbsd/android/include \
1002 $(LOCAL_PATH)/upstream-openbsd/lib/libc/include \
1004 LOCAL_MODULE := libc_gdtoa
1005 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1006 LOCAL_CXX_STL := none
1007 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1008 LOCAL_SANITIZE := never
1009 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1011 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1012 include $(BUILD_STATIC_LIBRARY)
1015 # ========================================================
1016 # libc_bionic.a - home-grown C library code
1017 # ========================================================
1019 include $(CLEAR_VARS)
1021 LOCAL_SRC_FILES := $(libc_bionic_src_files)
1022 LOCAL_CFLAGS := $(libc_common_cflags) \
1023 -Wframe-larger-than=2048 \
1025 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1026 LOCAL_CPPFLAGS := $(libc_common_cppflags) -Wold-style-cast
1027 LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
1028 LOCAL_MODULE := libc_bionic
1029 LOCAL_CLANG := $(use_clang)
1030 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1031 LOCAL_CXX_STL := none
1032 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1033 LOCAL_SANITIZE := never
1034 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1036 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1037 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files))
1038 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES_EXCLUDE,libc_bionic_src_files_exclude))
1039 include $(BUILD_STATIC_LIBRARY)
1042 # ========================================================
1043 # libc_bionic_ndk.a - The portions of libc_bionic that can
1044 # be safely used in libc_ndk.a (no troublesome global data
1046 # ========================================================
1048 include $(CLEAR_VARS)
1050 LOCAL_SRC_FILES := $(libc_bionic_ndk_src_files)
1051 LOCAL_CFLAGS := $(libc_common_cflags) \
1052 -Wframe-larger-than=2048 \
1054 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1055 LOCAL_CPPFLAGS := $(libc_common_cppflags) -Wold-style-cast
1056 LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
1057 LOCAL_MODULE := libc_bionic_ndk
1058 LOCAL_CLANG := $(use_clang)
1059 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1060 LOCAL_CXX_STL := none
1061 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1062 LOCAL_SANITIZE := never
1063 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1065 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1066 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_ndk_src_files))
1067 include $(BUILD_STATIC_LIBRARY)
1070 # ========================================================
1071 # libc_pthread.a - pthreads parts that previously lived in
1072 # libc_bionic.a. Relocated to their own library because
1073 # they can't be included in libc_ndk.a (as they layout of
1074 # pthread_t has changed over the years and has ABI
1075 # compatibility issues).
1076 # ========================================================
1078 include $(CLEAR_VARS)
1080 LOCAL_SRC_FILES := $(libc_pthread_src_files)
1081 LOCAL_CFLAGS := $(libc_common_cflags) \
1082 -Wframe-larger-than=2048 \
1084 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1085 LOCAL_CPPFLAGS := $(libc_common_cppflags) -Wold-style-cast
1086 LOCAL_C_INCLUDES := $(libc_common_c_includes)
1087 LOCAL_MODULE := libc_pthread
1088 LOCAL_CLANG := $(use_clang)
1089 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1090 LOCAL_CXX_STL := none
1091 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1092 LOCAL_SANITIZE := never
1093 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1095 include $(BUILD_STATIC_LIBRARY)
1098 # ========================================================
1099 # libc_cxa.a - Things traditionally in libstdc++
1100 # ========================================================
1102 include $(CLEAR_VARS)
1104 LOCAL_SRC_FILES := $(libc_cxa_src_files)
1105 LOCAL_CFLAGS := $(libc_common_cflags) \
1106 -fvisibility=hidden \
1108 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1109 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1110 LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
1111 LOCAL_MODULE := libc_cxa
1112 LOCAL_CLANG := true # GCC refuses to hide new/delete
1113 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1114 LOCAL_CXX_STL := none
1115 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1116 LOCAL_SANITIZE := never
1117 # b/17574078: Need to disable coverage until we have a prebuilt libprofile_rt.
1118 # Since this is a static library built with clang, it needs to link
1119 # libprofile_rt when it is linked into the final binary. Since the final binary
1120 # is built with GCC, it won't link libprofile_rt. We can't very easily just add
1121 # libprofile_rt to all link lines the way we've done for libgcov because
1122 # libprofile_rt isn't prebuilt, and it would be tricky to write a rule that
1123 # would make sure libprofile_rt is built.
1124 LOCAL_NATIVE_COVERAGE := false
1126 include $(BUILD_STATIC_LIBRARY)
1129 # ========================================================
1131 # ========================================================
1133 include $(CLEAR_VARS)
1135 LOCAL_SRC_FILES_$(TARGET_ARCH) := $(call all-S-files-under,arch-$(TARGET_ARCH)/syscalls)
1136 ifdef TARGET_2ND_ARCH
1137 LOCAL_SRC_FILES_$(TARGET_2ND_ARCH) := $(call all-S-files-under,arch-$(TARGET_2ND_ARCH)/syscalls)
1139 LOCAL_MODULE := libc_syscalls
1140 LOCAL_CLANG := $(use_clang)
1141 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1142 LOCAL_CXX_STL := none
1143 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1144 LOCAL_SANITIZE := never
1145 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1147 include $(BUILD_STATIC_LIBRARY)
1150 # ========================================================
1152 # This is an LP32 ARM-only library that needs to be built with -fno-builtin
1153 # to avoid infinite recursion. For the other architectures we just build an
1154 # empty library to keep this makefile simple.
1155 # ========================================================
1157 include $(CLEAR_VARS)
1159 LOCAL_SRC_FILES_arm := arch-arm/bionic/__aeabi.c
1160 LOCAL_MODULE := libc_aeabi
1161 LOCAL_CLANG := $(use_clang)
1162 LOCAL_CFLAGS := $(libc_common_cflags) -fno-builtin
1163 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1164 LOCAL_CXX_STL := none
1165 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1166 LOCAL_SANITIZE := never
1167 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1169 include $(BUILD_STATIC_LIBRARY)
1171 # ========================================================
1173 # Compatibility library for the NDK. This library contains
1174 # all the parts of libc that are safe to statically link.
1175 # We can't safely statically link things that can only run
1176 # on a certain version of the OS. Examples include
1177 # anything that talks to netd (a large portion of the DNS
1178 # code) and anything that is dependent on the layout of a
1179 # data structure that has changed across releases (such as
1181 # ========================================================
1183 include $(CLEAR_VARS)
1185 LOCAL_MODULE := libc_ndk
1186 LOCAL_CLANG := $(use_clang)
1187 LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
1188 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1189 LOCAL_CFLAGS := $(libc_common_cflags) -fvisibility=hidden -O0
1190 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1191 LOCAL_C_INCLUDES := $(libc_common_c_includes)
1192 LOCAL_SANITIZE := never
1193 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1194 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1196 LOCAL_SRC_FILES := \
1197 $(libc_common_src_files) \
1198 $(libc_arch_dynamic_src_files) \
1199 $(libc_ndk_stub_src_files) \
1200 bionic/malloc_debug_common.cpp \
1202 LOCAL_SRC_FILES_arm += \
1203 arch-common/bionic/crtbegin_so.c \
1204 arch-arm/bionic/atexit_legacy.c \
1205 arch-common/bionic/crtend_so.S \
1207 LOCAL_CFLAGS := $(libc_common_cflags) \
1210 LOCAL_WHOLE_STATIC_LIBRARIES := \
1218 libc_stack_protector \
1223 LOCAL_WHOLE_STATIC_LIBRARIES_arm := libc_aeabi
1224 LOCAL_CXX_STL := none
1226 ifneq ($(MALLOC_SVELTE),true)
1227 LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
1230 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1231 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files))
1232 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files))
1233 $(eval $(call patch-up-arch-specific-flags,LOCAL_ASFLAGS,LOCAL_CFLAGS))
1235 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1236 include $(BUILD_STATIC_LIBRARY)
1238 # ========================================================
1240 # ========================================================
1242 include $(CLEAR_VARS)
1244 LOCAL_SRC_FILES := $(libc_common_src_files)
1245 LOCAL_CFLAGS := $(libc_common_cflags)
1246 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1247 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1248 LOCAL_C_INCLUDES := $(libc_common_c_includes)
1249 LOCAL_MODULE := libc_common
1250 LOCAL_CLANG := $(use_clang)
1251 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1252 LOCAL_WHOLE_STATIC_LIBRARIES := \
1264 libc_stack_protector \
1268 LOCAL_WHOLE_STATIC_LIBRARIES_arm := libc_aeabi
1270 LOCAL_CXX_STL := none
1271 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1273 # TODO: split out the asflags.
1274 LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
1275 LOCAL_SANITIZE := never
1276 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1278 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1279 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files))
1280 $(eval $(call patch-up-arch-specific-flags,LOCAL_ASFLAGS,LOCAL_CFLAGS))
1281 include $(BUILD_STATIC_LIBRARY)
1284 # ========================================================
1286 # ========================================================
1288 # This is a version of the static C library that does not
1289 # include malloc. It's useful in situations when the user wants
1290 # to provide their own malloc implementation, or wants to
1291 # explicitly disallow the use of malloc, such as in the
1294 include $(CLEAR_VARS)
1296 LOCAL_SRC_FILES := \
1297 $(libc_arch_static_src_files) \
1299 LOCAL_C_INCLUDES := $(libc_common_c_includes)
1300 LOCAL_CFLAGS := $(libc_common_cflags) \
1303 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1304 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1306 LOCAL_MODULE := libc_nomalloc
1307 LOCAL_CLANG := $(use_clang)
1308 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1309 LOCAL_WHOLE_STATIC_LIBRARIES := libc_common libc_init_static
1310 LOCAL_CXX_STL := none
1311 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1312 LOCAL_SANITIZE := never
1313 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1315 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1316 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files))
1317 include $(BUILD_STATIC_LIBRARY)
1320 # ========================================================
1321 # libc_malloc.a: the _prefixed_ malloc functions (like dlcalloc).
1322 # ========================================================
1324 include $(CLEAR_VARS)
1325 LOCAL_SRC_FILES := $(libc_malloc_src)
1326 LOCAL_CFLAGS := $(libc_common_cflags) \
1327 -fvisibility=hidden \
1329 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1330 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1331 LOCAL_C_INCLUDES := $(libc_common_c_includes)
1332 LOCAL_MODULE := libc_malloc
1333 LOCAL_CLANG := $(use_clang)
1334 LOCAL_CXX_STL := none
1335 LOCAL_SANITIZE := never
1336 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1337 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1338 include $(BUILD_STATIC_LIBRARY)
1341 # ========================================================
1343 # ========================================================
1344 include $(CLEAR_VARS)
1346 LOCAL_SRC_FILES := \
1347 $(libc_arch_static_src_files) \
1348 bionic/malloc_debug_common.cpp \
1350 LOCAL_CFLAGS := $(libc_common_cflags) \
1353 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1354 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1355 LOCAL_C_INCLUDES := $(libc_common_c_includes)
1356 LOCAL_MODULE := libc
1357 LOCAL_CLANG := $(use_clang)
1358 LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies)
1359 LOCAL_WHOLE_STATIC_LIBRARIES := libc_common libc_init_static
1361 ifneq ($(MALLOC_SVELTE),true)
1362 LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
1365 LOCAL_CXX_STL := none
1366 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1367 LOCAL_SANITIZE := never
1368 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1370 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1371 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files))
1372 include $(BUILD_STATIC_LIBRARY)
1375 # ========================================================
1377 # ========================================================
1378 include $(CLEAR_VARS)
1380 LOCAL_CFLAGS := $(libc_common_cflags)
1381 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1382 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1384 LOCAL_C_INCLUDES := $(libc_common_c_includes)
1385 LOCAL_SRC_FILES := \
1386 arch-common/bionic/crtbegin_so.c \
1387 arch-common/bionic/crtbrand.S \
1388 $(libc_arch_dynamic_src_files) \
1389 bionic/malloc_debug_common.cpp \
1390 bionic/libc_init_dynamic.cpp \
1391 bionic/NetdClient.cpp \
1392 arch-common/bionic/crtend_so.S \
1394 LOCAL_MODULE := libc
1395 LOCAL_CLANG := $(use_clang)
1396 LOCAL_REQUIRED_MODULES := tzdata
1397 LOCAL_ADDITIONAL_DEPENDENCIES := \
1398 $(libc_common_additional_dependencies) \
1399 $(LOCAL_PATH)/libc.arm.map \
1400 $(LOCAL_PATH)/libc.arm64.map \
1401 $(LOCAL_PATH)/libc.mips.map \
1402 $(LOCAL_PATH)/libc.mips64.map \
1403 $(LOCAL_PATH)/libc.x86.map \
1404 $(LOCAL_PATH)/libc.x86_64.map \
1405 $(LOCAL_PATH)/libc.arm.brillo.map \
1406 $(LOCAL_PATH)/libc.mips.brillo.map \
1407 $(LOCAL_PATH)/libc.x86.brillo.map \
1409 # Leave the symbols in the shared library so that stack unwinders can produce
1410 # meaningful name resolution.
1411 LOCAL_STRIP_MODULE := keep_symbols
1413 # Do not pack libc.so relocations; see http://b/20645321 for details.
1414 LOCAL_PACK_MODULE_RELOCATIONS := false
1416 # WARNING: The only library libc.so should depend on is libdl.so! If you add other libraries,
1417 # make sure to add -Wl,--exclude-libs=libgcc.a to the LOCAL_LDFLAGS for those libraries. This
1418 # ensures that symbols that are pulled into those new libraries from libgcc.a are not declared
1419 # external; if that were the case, then libc would not pull those symbols from libgcc.a as it
1420 # should, instead relying on the external symbols from the dependent libraries. That would
1421 # create a "cloaked" dependency on libgcc.a in libc though the libraries, which is not what
1424 LOCAL_SHARED_LIBRARIES := libdl
1425 LOCAL_WHOLE_STATIC_LIBRARIES := libc_common
1427 ifneq ($(MALLOC_SVELTE),true)
1428 LOCAL_WHOLE_STATIC_LIBRARIES += libjemalloc
1431 LOCAL_CXX_STL := none
1432 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1434 # TODO: This is to work around b/24465209. Remove after root cause is fixed
1435 LOCAL_LDFLAGS_arm := -Wl,--hash-style=both
1436 LOCAL_LDFLAGS_x86 := -Wl,--hash-style=both
1438 # Don't re-export new/delete and friends, even if the compiler really wants to.
1440 LOCAL_LDFLAGS_arm += -Wl,--version-script,$(LOCAL_PATH)/libc.arm.brillo.map
1441 LOCAL_LDFLAGS_mips += -Wl,--version-script,$(LOCAL_PATH)/libc.mips.brillo.map
1442 LOCAL_LDFLAGS_x86 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86.brillo.map
1444 LOCAL_LDFLAGS_arm += -Wl,--version-script,$(LOCAL_PATH)/libc.arm.map
1445 LOCAL_LDFLAGS_mips += -Wl,--version-script,$(LOCAL_PATH)/libc.mips.map
1446 LOCAL_LDFLAGS_x86 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86.map
1449 LOCAL_LDFLAGS_arm64 += -Wl,--version-script,$(LOCAL_PATH)/libc.arm64.map
1450 LOCAL_LDFLAGS_mips64 += -Wl,--version-script,$(LOCAL_PATH)/libc.mips64.map
1451 LOCAL_LDFLAGS_x86_64 += -Wl,--version-script,$(LOCAL_PATH)/libc.x86_64.map
1453 # We'd really like to do this for all architectures, but since this wasn't done
1454 # before, these symbols must continue to be exported on LP32 for binary
1456 LOCAL_LDFLAGS_64 := -Wl,--exclude-libs,libgcc.a
1458 # Unfortunately --exclude-libs clobbers our version script, so we have to
1459 # prevent the build system from using this flag.
1460 LOCAL_NO_EXCLUDE_LIBS := true
1462 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1463 $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_dynamic_src_files))
1465 LOCAL_NO_CRT := true
1466 LOCAL_ASFLAGS += $(libc_crt_target_cflags)
1469 LOCAL_CFLAGS_arm += -DCRT_LEGACY_WORKAROUND
1470 LOCAL_SRC_FILES_arm += \
1471 arch-arm/bionic/atexit_legacy.c
1473 LOCAL_SANITIZE := never
1474 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1476 include $(BUILD_SHARED_LIBRARY)
1479 # For all builds, except for the -user build we will enable memory
1480 # allocation checking (including memory leaks, buffer overwrites, etc.)
1481 # Note that all these checks are also controlled by env. settings
1482 # that can enable, or disable specific checks. Note also that some of
1483 # the checks are available only in emulator and are implemeted in
1484 # libc_malloc_qemu_instrumented.so.
1485 ifneq ($(TARGET_BUILD_VARIANT),user)
1487 # ========================================================
1488 # libc_malloc_debug_leak.so
1489 # ========================================================
1490 include $(CLEAR_VARS)
1492 LOCAL_CFLAGS := $(libc_common_cflags)
1493 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1494 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1496 # Make sure that unwind.h comes from libunwind.
1497 LOCAL_C_INCLUDES := \
1498 $(libc_common_c_includes) \
1500 LOCAL_SRC_FILES := \
1501 bionic/debug_backtrace.cpp \
1502 bionic/debug_mapinfo.cpp \
1503 bionic/libc_logging.cpp \
1504 bionic/malloc_debug_leak.cpp \
1505 bionic/malloc_debug_check.cpp \
1507 LOCAL_MODULE := libc_malloc_debug_leak
1508 LOCAL_CLANG := $(use_clang)
1509 LOCAL_ADDITIONAL_DEPENDENCIES := \
1510 $(libc_common_additional_dependencies) \
1511 $(LOCAL_PATH)/version_script.txt \
1513 LOCAL_SHARED_LIBRARIES := libc libdl
1514 LOCAL_CXX_STL := none
1515 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1516 # Only need this for arm since libc++ uses its own unwind code that
1517 # doesn't mix with the other default unwind code.
1518 LOCAL_STATIC_LIBRARIES_arm := libunwind_llvm
1519 LOCAL_LDFLAGS_arm := -Wl,--exclude-libs,libunwind_llvm.a
1520 LOCAL_STATIC_LIBRARIES += libc++abi
1521 LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
1523 # Don't re-export new/delete and friends, even if the compiler really wants to.
1524 LOCAL_LDFLAGS := -Wl,--version-script,$(LOCAL_PATH)/version_script.txt
1526 # Unfortunately --exclude-libs clobbers our version script, so we have to
1527 # prevent the build system from using this flag.
1528 LOCAL_NO_EXCLUDE_LIBS := true
1530 # Don't install on release build
1531 LOCAL_MODULE_TAGS := eng debug
1532 LOCAL_SANITIZE := never
1533 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1535 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1536 include $(BUILD_SHARED_LIBRARY)
1539 # ========================================================
1540 # libc_malloc_debug_qemu.so
1541 # ========================================================
1542 include $(CLEAR_VARS)
1545 $(libc_common_cflags) \
1546 -DMALLOC_QEMU_INSTRUMENT \
1548 LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
1549 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1551 LOCAL_C_INCLUDES := $(libc_common_c_includes)
1553 LOCAL_SRC_FILES := \
1554 bionic/libc_logging.cpp \
1555 bionic/malloc_debug_qemu.cpp \
1557 LOCAL_MODULE := libc_malloc_debug_qemu
1558 LOCAL_CLANG := $(use_clang)
1559 LOCAL_ADDITIONAL_DEPENDENCIES := \
1560 $(libc_common_additional_dependencies) \
1561 $(LOCAL_PATH)/version_script.txt \
1563 LOCAL_SHARED_LIBRARIES := libc libdl
1564 LOCAL_CXX_STL := none
1565 LOCAL_SYSTEM_SHARED_LIBRARIES :=
1567 # Don't re-export new/delete and friends, even if the compiler really wants to.
1568 LOCAL_LDFLAGS := -Wl,--version-script,$(LOCAL_PATH)/version_script.txt
1570 # Unfortunately --exclude-libs clobbers our version script, so we have to
1571 # prevent the build system from using this flag.
1572 LOCAL_NO_EXCLUDE_LIBS := true
1574 # Don't install on release build
1575 LOCAL_MODULE_TAGS := eng debug
1576 LOCAL_SANITIZE := never
1577 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1579 $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags))
1580 include $(BUILD_SHARED_LIBRARY)
1584 # ========================================================
1586 # ========================================================
1587 libstdcxx_common_src_files := \
1588 bionic/__cxa_guard.cpp \
1589 bionic/__cxa_pure_virtual.cpp \
1591 bionic/libc_logging.cpp \
1593 include $(CLEAR_VARS)
1594 LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
1595 LOCAL_CFLAGS := $(libc_common_cflags)
1596 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1598 # TODO: This is to work around b/24465209. Remove after root cause is fixed
1599 LOCAL_LDFLAGS_arm := -Wl,--hash-style=both
1600 LOCAL_LDFLAGS_x86 := -Wl,--hash-style=both
1602 LOCAL_SRC_FILES := $(libstdcxx_common_src_files)
1603 LOCAL_MODULE:= libstdc++
1604 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
1605 LOCAL_CXX_STL := none
1606 LOCAL_SYSTEM_SHARED_LIBRARIES := libc
1607 LOCAL_SANITIZE := never
1608 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1609 include $(BUILD_SHARED_LIBRARY)
1611 # ========================================================
1613 # ========================================================
1614 include $(CLEAR_VARS)
1615 LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
1616 LOCAL_CFLAGS := $(libc_common_cflags)
1617 LOCAL_CPPFLAGS := $(libc_common_cppflags)
1618 LOCAL_SRC_FILES := $(libstdcxx_common_src_files)
1619 LOCAL_MODULE:= libstdc++
1620 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
1621 LOCAL_CXX_STL := none
1622 LOCAL_SYSTEM_SHARED_LIBRARIES := libc
1623 LOCAL_SANITIZE := never
1624 LOCAL_NATIVE_COVERAGE := $(bionic_coverage)
1625 include $(BUILD_STATIC_LIBRARY)