summaryrefslogtreecommitdiffstats
path: root/core/binary.mk
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-01-25 16:20:57 -0800
committerDan Albert <danalbert@google.com>2015-04-01 19:03:22 -0700
commit343ed674e35ae0911542abe67dca3fb3a1cccf95 (patch)
treeed945008efc80e6f54672120398999962744c186 /core/binary.mk
parent24a71e1565d48d6b5f9cdbd12e4cb279ae7e18bb (diff)
downloadbuild-343ed674e35ae0911542abe67dca3fb3a1cccf95.zip
build-343ed674e35ae0911542abe67dca3fb3a1cccf95.tar.gz
build-343ed674e35ae0911542abe67dca3fb3a1cccf95.tar.bz2
Use prebuilt libclang_rt.profile.
Bug: 17574078 Change-Id: I4838cd5d125a0b2bf76aad2fdaef1ee3122687e8
Diffstat (limited to 'core/binary.mk')
-rw-r--r--core/binary.mk24
1 files changed, 7 insertions, 17 deletions
diff --git a/core/binary.mk b/core/binary.mk
index 92b08fa..15d5d1e 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -294,24 +294,14 @@ endif # LOCAL_IS_HOST_MODULE
# clean build of your module after toggling it.
ifeq ($(NATIVE_COVERAGE),true)
ifeq ($(my_native_coverage),true)
+ # 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_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`.
- #
- # http://stackoverflow.com/questions/17758126/clang-code-coverage-invalid-output
- my_static_libraries += libprofile_rt
- else
- my_ldflags += --coverage
- endif
+ my_ldflags += --coverage
endif
else
my_native_coverage := false