[PATCH v2 18/20] kconfig: add CC_HAS_CONDITION_COVERAGE for MC/DC support detection
From: Sasha Levin
Date: Mon Nov 02 2026 - 20:53:56 EST
Add a Kconfig symbol to detect compiler support for -fcondition-coverage,
which enables MC/DC (Modified Condition/Decision Coverage) instrumentation.
This flag is available since GCC 14.
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
scripts/Kconfig.toolchain | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/Kconfig.toolchain b/scripts/Kconfig.toolchain
index 2acbd40a38f16..76c1e794d1157 100644
--- a/scripts/Kconfig.toolchain
+++ b/scripts/Kconfig.toolchain
@@ -188,6 +188,9 @@ config CC_OPT_NO_ALLOW_STORE_DATA_RACES
config CC_HAS_MNOP_MCOUNT
def_bool $(cc-option,-mnop-mcount)
+config CC_HAS_CONDITION_COVERAGE
+ def_bool $(cc-option,-fcondition-coverage)
+
config LD_OPT_FORCE_GROUP_ALLOCATION
def_string "$(ld-option-str,--force-group-allocation)"
--
2.53.0