diff --git a/libc/Android.mk b/libc/Android.mk index 0670930a2..0dc6c3b35 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -1,5 +1,7 @@ LOCAL_PATH := $(call my-dir) +bionic_coverage := false + # Make everything depend on any changes to included makefiles. libc_common_additional_dependencies := $(LOCAL_PATH)/Android.mk @@ -602,6 +604,7 @@ LOCAL_CLANG := $(use_clang) LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) include $(BUILD_STATIC_LIBRARY) @@ -641,6 +644,7 @@ LOCAL_CLANG := $(use_clang) LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) include $(BUILD_STATIC_LIBRARY) @@ -684,6 +688,7 @@ LOCAL_CLANG := $(use_clang) LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) include $(BUILD_STATIC_LIBRARY) @@ -714,6 +719,7 @@ LOCAL_CLANG := $(use_clang) LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_freebsd_src_files)) @@ -746,6 +752,7 @@ LOCAL_CLANG := $(use_clang) LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_netbsd_src_files)) @@ -785,6 +792,7 @@ LOCAL_MODULE := libc_openbsd LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_openbsd_src_files)) @@ -825,6 +833,7 @@ LOCAL_MODULE := libc_gdtoa LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) include $(BUILD_STATIC_LIBRARY) @@ -853,6 +862,7 @@ LOCAL_CLANG := $(use_clang) LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_bionic_src_files)) @@ -877,6 +887,7 @@ LOCAL_CLANG := true # GCC refuses to hide new/delete LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) include $(BUILD_STATIC_LIBRARY) @@ -896,6 +907,7 @@ LOCAL_CLANG := $(use_clang) LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) include $(BUILD_STATIC_LIBRARY) @@ -916,6 +928,7 @@ LOCAL_CFLAGS := $(libc_common_cflags) -fno-builtin LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) include $(BUILD_STATIC_LIBRARY) @@ -957,6 +970,7 @@ LOCAL_SYSTEM_SHARED_LIBRARIES := # TODO: split out the asflags. LOCAL_ASFLAGS := $(LOCAL_CFLAGS) +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_common_src_files)) @@ -994,6 +1008,7 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_WHOLE_STATIC_LIBRARIES := libc_common LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files)) @@ -1015,6 +1030,7 @@ LOCAL_C_INCLUDES := $(libc_common_c_includes) LOCAL_MODULE := libc_malloc LOCAL_CLANG := $(use_clang) LOCAL_CXX_STL := none +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) include $(BUILD_STATIC_LIBRARY) @@ -1042,6 +1058,7 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(libc_common_additional_dependencies) LOCAL_WHOLE_STATIC_LIBRARIES := libc_common LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) $(eval $(call patch-up-arch-specific-flags,LOCAL_SRC_FILES,libc_arch_static_src_files)) @@ -1103,6 +1120,7 @@ LOCAL_SRC_FILES_arm += \ arch-common/bionic/crtbegin_so.c \ arch-arm/bionic/atexit_legacy.c \ arch-common/bionic/crtend_so.S +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) include $(BUILD_SHARED_LIBRARY) @@ -1149,6 +1167,7 @@ LOCAL_ALLOW_UNDEFINED_SYMBOLS := true # Don't install on release build LOCAL_MODULE_TAGS := eng debug +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) include $(BUILD_SHARED_LIBRARY) @@ -1182,6 +1201,7 @@ LOCAL_SYSTEM_SHARED_LIBRARIES := # Don't install on release build LOCAL_MODULE_TAGS := eng debug +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) $(eval $(call patch-up-arch-specific-flags,LOCAL_CFLAGS,libc_common_cflags)) include $(BUILD_SHARED_LIBRARY) @@ -1206,6 +1226,7 @@ LOCAL_MODULE:= libstdc++ LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := libc +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) include $(BUILD_SHARED_LIBRARY) # ======================================================== @@ -1220,6 +1241,7 @@ LOCAL_MODULE:= libstdc++ LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_CXX_STL := none LOCAL_SYSTEM_SHARED_LIBRARIES := libc +LOCAL_NATIVE_COVERAGE := $(bionic_coverage) include $(BUILD_STATIC_LIBRARY)