mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
kbuild: unify W=e and CONFIG_WERROR
The two mechanisms have the same effect, unify their implementation. Also avoid spurious rebuilds when switching between the two. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Nicolas Schier <nsc@kernel.org> Link: https://lore.kernel.org/r/20250814-kbuild-werror-v2-2-c01e596309d2@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
@@ -25,8 +25,6 @@ ifneq ($(CONFIG_FRAME_WARN),0)
|
||||
KBUILD_CFLAGS += -Wframe-larger-than=$(CONFIG_FRAME_WARN)
|
||||
endif
|
||||
|
||||
KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror
|
||||
KBUILD_CPPFLAGS += $(KBUILD_CPPFLAGS-y)
|
||||
KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds
|
||||
|
||||
ifdef CONFIG_CC_IS_CLANG
|
||||
@@ -214,9 +212,9 @@ KBUILD_CFLAGS += -Wno-unused-parameter
|
||||
endif
|
||||
|
||||
#
|
||||
# W=e - error out on warnings
|
||||
# W=e and CONFIG_WERROR - error out on warnings
|
||||
#
|
||||
ifneq ($(findstring e, $(KBUILD_EXTRA_WARN)),)
|
||||
ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
|
||||
|
||||
KBUILD_CPPFLAGS += -Werror
|
||||
|
||||
|
||||
Reference in New Issue
Block a user