On 01.04.2025 03:17, Volodymyr Babchuk wrote:
> --- a/xen/Kconfig
> +++ b/xen/Kconfig
> @@ -41,6 +41,11 @@ config CC_SPLIT_SECTIONS
>  config CC_HAS_UBSAN
>       def_bool $(cc-option,-fsanitize=undefined)
>  
> +# Compiler supports -fcondition-coverage aka MC/DC
> +config CC_HAS_MCDC
> +     def_bool $(cc-option,-fcondition-coverage)
> +
> +

Nit: No double blank lines please.

Also, just to clarify - until the use of Kconfig (alone) for things like
this is properly resolved one way or another, I'm not going to approve
such changes (but I'm also not going to veto them). My proposal [1] is
still pending with no resolution, nor any counter-proposals.

> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -138,6 +138,9 @@ ifeq ($(CONFIG_CC_IS_CLANG),y)
>      COV_FLAGS := -fprofile-instr-generate -fcoverage-mapping
>  else
>      COV_FLAGS := -fprofile-arcs -ftest-coverage
> +ifeq ($(CONFIG_CONDITION_COVERAGE),y)
> +    COV_FLAGS += -fcondition-coverage
> +endif
>  endif

Personally I find ifeq() uses like this unhelpful, and would prefer

COV_FLAGS-$(CONFIG_CONDITION_COVERAGE) += -fcondition-coverage
together with an eventual

COV_FLAGS += $(COV_FLAGS-y)

(if we don't already have one).

Jan

[1] https://lists.xen.org/archives/html/xen-devel/2022-09/msg01793.html

Reply via email to