diff mbox series

[1/3] kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn`

Message ID 20240519211235.589325-1-ojeda@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/3] kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn` | expand

Commit Message

Miguel Ojeda May 19, 2024, 9:12 p.m. UTC
Following commit e88ca24319e4 ("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>
---
 Makefile                   | 3 ---
 scripts/Makefile.extrawarn | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Alice Ryhl May 20, 2024, 9:41 a.m. UTC | #1
On Sun, May 19, 2024 at 11:12 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> Following commit e88ca24319e4 ("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: Alice Ryhl <aliceryhl@google.com>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 763b6792d3d5..fba567a55607 100644
--- a/Makefile
+++ b/Makefile
@@ -842,9 +842,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
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 3ce5d503a6da..48114e91c386 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -26,6 +26,9 @@  endif
 
 KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror
 KBUILD_CPPFLAGS += $(KBUILD_CPPFLAGS-y)
+KBUILD_RUSTFLAGS-$(CONFIG_WERROR) += -Dwarnings
+KBUILD_RUSTFLAGS += $(KBUILD_RUSTFLAGS-y)
+
 KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds
 
 ifdef CONFIG_CC_IS_CLANG