[PATCH 3/3] kbuild: rust: support `W=e` for Rust
From: Miguel Ojeda
Date: Sun May 19 2024 - 17:13:31 EST
With `W=e`, kernel C targets error out on warnings.
Add support for the same feature for Rust code, but take the opportunity
to apply it for every Rust target (i.e. not just kernel code), so that
it behaves like having set `CONFIG_WERROR`.
Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
---
scripts/Makefile.extrawarn | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 990890821889..214b5edce4f2 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -206,5 +206,6 @@ endif
ifneq ($(findstring e, $(KBUILD_EXTRA_WARN)),)
KBUILD_CFLAGS += -Werror
+rust_common_flags += -Dwarnings
endif
--
2.45.1