Skip to content

Commit 592b571

Browse files
ojedanathanchance
authored andcommitted
kbuild: rust: move -Dwarnings handling to Makefile.extrawarn
Following commit e88ca24 ("kbuild: consolidate warning flags in scripts/Makefile.extrawarn"), move `-Dwarnings` handling into `Makefile.extrawarn` like C's `-Werror`. No functional change intended. Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Reviewed-by: Nicolas Schier <nsc@kernel.org> Link: https://lore.kernel.org/r/20250814-kbuild-werror-v2-3-c01e596309d2@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent e7a1092 commit 592b571

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,9 +901,6 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
901901

902902
KBUILD_CFLAGS += $(stackp-flags-y)
903903

904-
KBUILD_RUSTFLAGS-$(CONFIG_WERROR) += -Dwarnings
905-
KBUILD_RUSTFLAGS += $(KBUILD_RUSTFLAGS-y)
906-
907904
ifdef CONFIG_FRAME_POINTER
908905
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
909906
KBUILD_RUSTFLAGS += -Cforce-frame-pointers=y

scripts/Makefile.extrawarn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,5 +217,6 @@ endif
217217
ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
218218

219219
KBUILD_CPPFLAGS += -Werror
220+
KBUILD_RUSTFLAGS += -Dwarnings
220221

221222
endif

0 commit comments

Comments
 (0)