kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn`

Following commit e88ca24319 ("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>
pull/1354/merge
Miguel Ojeda 2025-08-14 12:14:43 +02:00 committed by Nathan Chancellor
parent e7a10929c5
commit 592b571f20
No known key found for this signature in database
GPG Key ID: 1D6B269171C01A96
2 changed files with 1 additions and 3 deletions

View File

@ -901,9 +901,6 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
KBUILD_CFLAGS += $(stackp-flags-y)
KBUILD_RUSTFLAGS-$(CONFIG_WERROR) += -Dwarnings
KBUILD_RUSTFLAGS += $(KBUILD_RUSTFLAGS-y)
ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
KBUILD_RUSTFLAGS += -Cforce-frame-pointers=y

View File

@ -217,5 +217,6 @@ endif
ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
KBUILD_CPPFLAGS += -Werror
KBUILD_RUSTFLAGS += -Dwarnings
endif