[PATCH 1/2] arch: um: Add Clang coverage support
Michał Winiarski
michal.winiarski at intel.com
Fri Oct 20 02:21:58 PDT 2023
Clang uses a different set of command line arguments for enabling
coverage.
Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>
---
arch/um/Makefile-skas | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/um/Makefile-skas b/arch/um/Makefile-skas
index ac35de5316a6..67323b028999 100644
--- a/arch/um/Makefile-skas
+++ b/arch/um/Makefile-skas
@@ -4,7 +4,12 @@
#
GPROF_OPT += -pg
+
+ifdef CONFIG_CC_IS_CLANG
+GCOV_OPT += -fprofile-instr-generate -fcoverage-mapping
+else
GCOV_OPT += -fprofile-arcs -ftest-coverage
+endif
CFLAGS-$(CONFIG_GCOV) += $(GCOV_OPT)
CFLAGS-$(CONFIG_GPROF) += $(GPROF_OPT)
--
2.42.0
More information about the linux-um
mailing list