Enable coverage only when LOCAL_SDK_VERSION > 23

Bug: http://b/116873221

The coverage runtime (libclang_rt.profile) needs stderr, which is
exported by bionic only after API level 23.

Test: Build with coverage on globally
Change-Id: I1bdfbbf248d1743d529e9f40f0b52da92bb20ef7
This commit is contained in:
Pirama Arumuga Nainar
2018-12-20 13:47:44 -08:00
parent 00d74cc938
commit 9305e203f0

View File

@@ -254,6 +254,14 @@ ifneq ($(LOCAL_SDK_VERSION),)
else # LOCAL_NDK_STL_VARIANT must be none
# Do nothing.
endif
# Clang's coverage/profile runtime needs symbols like 'stderr' that were not
# exported from libc prior to API level 23
ifneq ($(my_ndk_api),current)
ifeq ($(call math_lt, $(my_ndk_api),23),true)
my_native_coverage := false
endif
endif
endif
ifneq ($(LOCAL_USE_VNDK),)