Message ID | 20240519211235.589325-3-ojeda@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn` | expand |
On Sun, May 19, 2024 at 11:13 PM Miguel Ojeda <ojeda@kernel.org> wrote: > > 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@kernel.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com>
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
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@kernel.org> --- scripts/Makefile.extrawarn | 1 + 1 file changed, 1 insertion(+)