From 5a6ea36cb890188de402b7df2f3bf06229360e11 Mon Sep 17 00:00:00 2001 From: Ryan Campbell Date: Tue, 28 Feb 2017 16:20:23 -0800 Subject: [PATCH] Use c and cpp objects for gcov. Instead of using all_objects and translating .o to .gcno, use cpp_objects, gen_cpp_objects, c_objects, gen_c_objects, objc_objects, and objcpp_objects. Fixes bug with .s files breaking coverage builds. Bug: 35843991 Test: lunch sailfish-userdebug && make -j60 NATIVE_COVERAGE=true COVERAGE_PATHS="vendor/google_devices/marlin/proprietary/mm-camera/mm-camera2" Change-Id: Ib2f8eef889f075ec82f79d8c3ae0fe31962b653d --- core/binary.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/binary.mk b/core/binary.mk index 34bbe4ea6..ecf38d2b0 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -1859,6 +1859,14 @@ endif # Coverage packaging. ########################################################### ifeq ($(my_native_coverage),true) -LOCAL_GCNO_FILES := $(patsubst %.o,%.gcno,$(all_objects)) -$(foreach f,$(all_objects),$(eval $(call gcno-touch-rule,$(f),$(f:.o=.gcno)))) +my_gcno_objects := \ + $(cpp_objects) \ + $(gen_cpp_objects) \ + $(c_objects) \ + $(gen_c_objects) \ + $(objc_objects) \ + $(objcpp_objects) + +LOCAL_GCNO_FILES := $(patsubst %.o,%.gcno,$(my_gcno_objects)) +$(foreach f,$(my_gcno_objects),$(eval $(call gcno-touch-rule,$(f),$(f:.o=.gcno)))) endif