diff options
Diffstat (limited to 'build/Android.common.mk')
-rw-r--r-- | build/Android.common.mk | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/build/Android.common.mk b/build/Android.common.mk index 1f040d6..0f756ef 100644 --- a/build/Android.common.mk +++ b/build/Android.common.mk @@ -20,6 +20,21 @@ ART_ANDROID_COMMON_MK = true ART_TARGET_SUPPORTED_ARCH := arm arm64 mips mips64 x86 x86_64 ART_HOST_SUPPORTED_ARCH := x86 x86_64 +ART_COVERAGE := false + +ifeq ($(ART_COVERAGE),true) +# https://gcc.gnu.org/onlinedocs/gcc/Cross-profiling.html +GCOV_PREFIX := /data/local/tmp/gcov +# GCOV_PREFIX_STRIP is an integer that defines how many levels should be +# stripped off the beginning of the path. We want the paths in $GCOV_PREFIX to +# be relative to $ANDROID_BUILD_TOP so we can just adb pull from the top and not +# have to worry about placing things ourselves. +GCOV_PREFIX_STRIP := $(shell echo $(ANDROID_BUILD_TOP) | grep -o / | wc -l) +GCOV_ENV := GCOV_PREFIX=$(GCOV_PREFIX) GCOV_PREFIX_STRIP=$(GCOV_PREFIX_STRIP) +else +GCOV_ENV := +endif + ifeq (,$(filter $(TARGET_ARCH),$(ART_TARGET_SUPPORTED_ARCH))) $(warning unsupported TARGET_ARCH=$(TARGET_ARCH)) endif |