Loading core/binary.mk +7 −17 Original line number Diff line number Diff line Loading @@ -294,25 +294,15 @@ endif # LOCAL_IS_HOST_MODULE # clean build of your module after toggling it. ifeq ($(NATIVE_COVERAGE),true) ifeq ($(my_native_coverage),true) my_cflags += --coverage -O0 ifeq ($(my_clang),true) # b/17574078 # We currently don't have a prebuilt libclang_rt.profile-<ARCH>.a, # which clang is hardcoded to link if --coverage is passed in the # link stage. For now we manually link libprofile_rt (which is the # name it is built as from external/compiler-rt). # # Note that clang coverage doesn't play nicely with acov out of the # box. Clang apparently generates .gcno files that aren't compatible # with gcov-4.8. This can be solved by installing gcc-4.6 and # invoking lcov with `--gcov-tool /usr/bin/gcov-4.6`. # Note that clang coverage doesn't play nicely with acov out of the box. # Clang apparently generates .gcno files that aren't compatible with # gcov-4.8. This can be solved by installing gcc-4.6 and invoking lcov # with `--gcov-tool /usr/bin/gcov-4.6`. # # http://stackoverflow.com/questions/17758126/clang-code-coverage-invalid-output my_static_libraries += libprofile_rt else my_cflags += --coverage -O0 my_ldflags += --coverage endif endif else my_native_coverage := false endif Loading core/clang/HOST_x86.mk +2 −0 Original line number Diff line number Diff line Loading @@ -76,3 +76,5 @@ $(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CPPFLAGS := \ $(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_LDFLAGS := \ $(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS)) \ $(CLANG_CONFIG_x86_HOST_EXTRA_LDFLAGS) $(clang_2nd_arch_prefix)HOST_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-i686.a core/clang/HOST_x86_64.mk +2 −0 Original line number Diff line number Diff line Loading @@ -76,3 +76,5 @@ CLANG_HOST_GLOBAL_CPPFLAGS := \ CLANG_HOST_GLOBAL_LDFLAGS := \ $(call convert-to-host-clang-flags,$(HOST_GLOBAL_LDFLAGS)) \ $(CLANG_CONFIG_x86_64_HOST_EXTRA_LDFLAGS) HOST_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-x86_64.a core/clang/TARGET_arm.mk +2 −0 Original line number Diff line number Diff line Loading @@ -64,3 +64,5 @@ $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ $(clang_2nd_arch_prefix)RS_TRIPLE := armv7-none-linux-gnueabi $(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := $(clang_2nd_arch_prefix)RS_COMPAT_TRIPLE := armv7-none-linux-gnueabi $(clang_2nd_arch_prefix)TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-arm-android.a core/clang/TARGET_arm64.mk +2 −0 Original line number Diff line number Diff line Loading @@ -62,3 +62,5 @@ CLANG_TARGET_GLOBAL_LDFLAGS := \ RS_TRIPLE := aarch64-linux-android RS_TRIPLE_CFLAGS := RS_COMPAT_TRIPLE := aarch64-linux-android TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-aarch64-android.a Loading
core/binary.mk +7 −17 Original line number Diff line number Diff line Loading @@ -294,25 +294,15 @@ endif # LOCAL_IS_HOST_MODULE # clean build of your module after toggling it. ifeq ($(NATIVE_COVERAGE),true) ifeq ($(my_native_coverage),true) my_cflags += --coverage -O0 ifeq ($(my_clang),true) # b/17574078 # We currently don't have a prebuilt libclang_rt.profile-<ARCH>.a, # which clang is hardcoded to link if --coverage is passed in the # link stage. For now we manually link libprofile_rt (which is the # name it is built as from external/compiler-rt). # # Note that clang coverage doesn't play nicely with acov out of the # box. Clang apparently generates .gcno files that aren't compatible # with gcov-4.8. This can be solved by installing gcc-4.6 and # invoking lcov with `--gcov-tool /usr/bin/gcov-4.6`. # Note that clang coverage doesn't play nicely with acov out of the box. # Clang apparently generates .gcno files that aren't compatible with # gcov-4.8. This can be solved by installing gcc-4.6 and invoking lcov # with `--gcov-tool /usr/bin/gcov-4.6`. # # http://stackoverflow.com/questions/17758126/clang-code-coverage-invalid-output my_static_libraries += libprofile_rt else my_cflags += --coverage -O0 my_ldflags += --coverage endif endif else my_native_coverage := false endif Loading
core/clang/HOST_x86.mk +2 −0 Original line number Diff line number Diff line Loading @@ -76,3 +76,5 @@ $(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CPPFLAGS := \ $(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_LDFLAGS := \ $(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_LDFLAGS)) \ $(CLANG_CONFIG_x86_HOST_EXTRA_LDFLAGS) $(clang_2nd_arch_prefix)HOST_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-i686.a
core/clang/HOST_x86_64.mk +2 −0 Original line number Diff line number Diff line Loading @@ -76,3 +76,5 @@ CLANG_HOST_GLOBAL_CPPFLAGS := \ CLANG_HOST_GLOBAL_LDFLAGS := \ $(call convert-to-host-clang-flags,$(HOST_GLOBAL_LDFLAGS)) \ $(CLANG_CONFIG_x86_64_HOST_EXTRA_LDFLAGS) HOST_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-x86_64.a
core/clang/TARGET_arm.mk +2 −0 Original line number Diff line number Diff line Loading @@ -64,3 +64,5 @@ $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ $(clang_2nd_arch_prefix)RS_TRIPLE := armv7-none-linux-gnueabi $(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := $(clang_2nd_arch_prefix)RS_COMPAT_TRIPLE := armv7-none-linux-gnueabi $(clang_2nd_arch_prefix)TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-arm-android.a
core/clang/TARGET_arm64.mk +2 −0 Original line number Diff line number Diff line Loading @@ -62,3 +62,5 @@ CLANG_TARGET_GLOBAL_LDFLAGS := \ RS_TRIPLE := aarch64-linux-android RS_TRIPLE_CFLAGS := RS_COMPAT_TRIPLE := aarch64-linux-android TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-aarch64-android.a