diff options
author | Dan Albert <danalbert@google.com> | 2015-01-24 23:48:46 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-01-24 23:48:46 +0000 |
commit | b89760a76b2c713f8e9bb4537415d35d51034ec7 (patch) | |
tree | 84202180e4c353ef91ad4dbb6d699a309dfca33f /core/binary.mk | |
parent | afa30df68e6914fdcc68c5f809d792db51250d4f (diff) | |
parent | 3723af1b4e8de4941d7b9be569f209d88f565964 (diff) | |
download | build-b89760a76b2c713f8e9bb4537415d35d51034ec7.zip build-b89760a76b2c713f8e9bb4537415d35d51034ec7.tar.gz build-b89760a76b2c713f8e9bb4537415d35d51034ec7.tar.bz2 |
am 3723af1b: am 9ba25d6b: Merge "Enable host coverage."
* commit '3723af1b4e8de4941d7b9be569f209d88f565964':
Enable host coverage.
Diffstat (limited to 'core/binary.mk')
-rw-r--r-- | core/binary.mk | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/core/binary.mk b/core/binary.mk index 008fa69..f675814 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -258,33 +258,6 @@ my_target_global_cppflags += $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CPPFLAG my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_LDFLAGS) endif # my_clang -# To enable coverage for a given module, set LOCAL_NATIVE_COVERAGE=true and -# build with NATIVE_COVERAGE=true in your enviornment. Note that the build -# system is not sensitive to changes to NATIVE_COVERAGE, so you should do a -# clean build of your module after toggling it. -ifeq ($(NATIVE_COVERAGE),true) - ifeq ($(my_native_coverage),true) - # We can't currently generate coverage for clang binaries for two - # reasons: - # - # 1) 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). - # - # 2) b/17583330 Clang doesn't generate .gcno files when using - # -no-integrated-as. Since most of the assembly in our tree is - # incompatible with clang's assembler, we can't turn off this flag. - ifneq ($(my_clang),true) - my_cflags += --coverage -O0 - my_ldflags += --coverage - endif - endif -else - my_native_coverage := false -endif - $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_PROJECT_INCLUDES := $(my_target_project_includes) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_C_INCLUDES := $(my_target_c_includes) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CFLAGS := $(my_target_global_cflags) @@ -315,6 +288,33 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CPPFLAGS := $(my_host_global_ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_LDFLAGS := $(my_host_global_ldflags) endif # LOCAL_IS_HOST_MODULE +# To enable coverage for a given module, set LOCAL_NATIVE_COVERAGE=true and +# build with NATIVE_COVERAGE=true in your enviornment. Note that the build +# system is not sensitive to changes to NATIVE_COVERAGE, so you should do a +# clean build of your module after toggling it. +ifeq ($(NATIVE_COVERAGE),true) + ifeq ($(my_native_coverage),true) + # We can't currently generate coverage for clang binaries for two + # reasons: + # + # 1) 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). + # + # 2) b/17583330 Clang doesn't generate .gcno files when using + # -no-integrated-as. Since most of the assembly in our tree is + # incompatible with clang's assembler, we can't turn off this flag. + ifneq ($(my_clang),true) + my_cflags += --coverage -O0 + my_ldflags += --coverage + endif + endif +else + my_native_coverage := false +endif + ########################################################### ## Define PRIVATE_ variables used by multiple module types ########################################################### |