Re: [PATCH 0/2] kbuild: enable CONFIG_WERROR for more build steps
From: Miguel Ojeda
Date: Tue Aug 12 2025 - 05:26:39 EST
On Tue, Aug 12, 2025 at 7:31 AM Thomas Weißschuh
<thomas.weissschuh@xxxxxxxxxxxxx> wrote:
>
> CONFIG_WERROR is useful for all build steps, not only compilation of C and
> Rust sources linked into the kernel.
>
> Also enable it for assembler and linker invocations, userprogs, as well as
> C and Rust hostprogs.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
The Rust part is:
https://lore.kernel.org/rust-for-linux/20240519211235.589325-1-ojeda@xxxxxxxxxx/
However, Masahiro back then mentioned that we shouldn't make the C
host flags depend on `WERROR` since `HOSTCC` builds Kconfig and, for
consistency, not for Rust host progs either:
https://lore.kernel.org/rust-for-linux/CAK7LNATPx2wTEM=KDmGtcH8vVTB4suOhh-CUQKP54F8wtPWDiw@xxxxxxxxxxxxxx/
Perhaps it could make sense to explicitly exclude certain bits, like
Kconfig, from `WERROR`, and apply it for everything else instead.
Cheers,
Miguel