1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 14:03:55 +01:00

build system: error on conflicting features

When the build system is aware of an invalid configuration - such as
multiple C libs being used or a single piece of hardware being used in
two conflicting roles - this now is treated as an error rather than
a warning.
This commit is contained in:
Marian Buschsieweke 2024-11-20 21:45:14 +01:00
parent d169826005
commit f166e74696
No known key found for this signature in database
GPG Key ID: 758BD52517F79C41

View File

@ -936,7 +936,6 @@ include $(RIOTMAKE)/usb-codes.inc.mk
# Warn if the selected board and drivers don't provide all needed features:
ifneq (, $(filter all flash, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
EXPECT_ERRORS :=
EXPECT_CONFLICT :=
# Test if there where dependencies against a module in DISABLE_MODULE.
ifneq (, $(filter $(DISABLE_MODULE), $(USEMODULE)))
@ -962,12 +961,12 @@ ifneq (, $(filter all flash, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
# Test if any used feature conflict with another one.
ifneq (,$(FEATURES_CONFLICTING))
$(shell $(COLOR_ECHO) "$(COLOR_YELLOW)The following features may conflict:$(COLOR_RESET)"\
$(shell $(COLOR_ECHO) "$(COLOR_RED)The following features conflict:$(COLOR_RESET)"\
"$(FEATURES_CONFLICTING)" 1>&2)
ifneq (, $(FEATURES_CONFLICT_MSG))
$(shell $(COLOR_ECHO) "$(COLOR_YELLOW)Rationale: $(COLOR_RESET)$(FEATURES_CONFLICT_MSG)" 1>&2)
endif
EXPECT_CONFLICT := 1
EXPECT_ERRORS := 1
endif
# If there is a whitelist, then test if the board is whitelisted.
@ -1000,10 +999,6 @@ ifneq (, $(filter all flash, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
endif
endif
ifneq (, $(EXPECT_CONFLICT))
$(shell $(COLOR_ECHO) "\n$(COLOR_YELLOW)EXPECT undesired behaviour!$(COLOR_RESET)" 1>&2)
endif
# Fail by default when errors are expected
CONTINUE_ON_EXPECTED_ERRORS ?= 0
ifneq (, $(EXPECT_ERRORS))