diff options
author | linyuny <linyuny@google.com> | 2023-09-12 00:49:16 +0000 |
---|---|---|
committer | Yunyun Lin <linyuny@google.com> | 2023-09-15 23:55:11 +0000 |
commit | 6e354f04cd43d280617bfc0d6b12d54f4d30361c (patch) | |
tree | 6c2254464e4c9a7cd8ead4fa81a1c7d25b5acbb8 | |
parent | 8d1468ba08be1259e4f17e0de210d4d771cf1ef8 (diff) | |
download | lwis-6e354f04cd43d280617bfc0d6b12d54f4d30361c.tar.gz |
LWIS: Add section to enable gcov for lwis code coverage purpose based on env.
Bug: 267775002
TESTED: https://acma.teams.x20web.corp.google.com/lwis_coverages/lwis_coverage.info
Change-Id: I4380778280ec1e6c45dc3b89377425c337f20e75
Signed-off-by: linyuny <linyuny@google.com>
-rw-r--r-- | Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -5,6 +5,14 @@ KBUILD_OPTIONS += CONFIG_LWIS=m include $(KERNEL_SRC)/../private/google-modules/soc/gs/Makefile.include +KBUILD_CFLAGS += -Wall -Werror + +ifeq ($(CONFIG_GCOV_KERNEL),y) + KBUILD_CFLAGS += $(call cc-option, -ftest-coverage) + KBUILD_CFLAGS += $(call cc-option, -fprofile-arcs) + EXTRA_CFLAGS += -DGCOV_PROFILE=1 +endif + modules modules_install clean: $(MAKE) -C $(KERNEL_SRC) M=$(M) W=1 \ $(KBUILD_OPTIONS) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" KBUILD_EXTRA_SYMBOLS="$(EXTRA_SYMBOLS)" $(@) |