aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.kcov
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.kcov')
-rw-r--r--scripts/Makefile.kcov7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/Makefile.kcov b/scripts/Makefile.kcov
new file mode 100644
index 000000000000..5cc72037e423
--- /dev/null
+++ b/scripts/Makefile.kcov
@@ -0,0 +1,7 @@
+ifdef CONFIG_KCOV
+CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
+ifeq ($(CONFIG_KCOV_ENABLE_COMPARISONS),y)
+CFLAGS_KCOV += $(call cc-option,-fsanitize-coverage=trace-cmp,)
+endif
+
+endif