summaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorMichał Winiarski <michal.winiarski@intel.com>2023-10-20 11:21:58 +0200
committerRichard Weinberger <richard@nod.at>2024-01-05 00:30:35 +0100
commit32a84cfc6caf830431375c5182391284986d4066 (patch)
tree24ec00efd25369dcc21ce7f508d7f3f1a765b849 /arch/um
parentum: time-travel: fix time corruption (diff)
downloadlinux-32a84cfc6caf830431375c5182391284986d4066.tar.xz
linux-32a84cfc6caf830431375c5182391284986d4066.zip
arch: um: Add Clang coverage support
Clang uses a different set of command line arguments for enabling coverage. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Tested-by: David Gow <davidgow@google.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/Makefile-skas5
1 files changed, 5 insertions, 0 deletions
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)