[PATCH 3/3] kbuild: rust: support `W=e` for Rust

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux