[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72mcdtNie=t=HHhZnjQa7gQiDZin+TYP_7Rgi4kL83H2BA@mail.gmail.com>
Date: Tue, 21 May 2024 10:05:16 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: Miguel Ojeda <ojeda@...nel.org>, Wedson Almeida Filho <wedsonaf@...il.com>,
Alex Gaynor <alex.gaynor@...il.com>, Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...sung.com>,
Alice Ryhl <aliceryhl@...gle.com>, linux-kbuild@...r.kernel.org,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
patches@...ts.linux.dev
Subject: Re: [PATCH 2/3] kbuild: rust: apply `CONFIG_WERROR` to all Rust targets
On Tue, May 21, 2024 at 6:15 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> Rust started to do something different from C.
>
> KBUILD_HOSTCFLAGS is not affected by any CONFIG option.
>
> The reason is because HOSTCC is needed for building Kconfig.
> If the flags for HOSTCC is changed by a CONFIG option,
> it would be a chicken-egg problem.
> Also, some host programs might be compiled even
> without .config at all. (e.g. scripts/unifdef)
>
> I know Rust will not become a part of the core infrastructure
> of the build system, but IMHO, host programs should not be
> affected by any CONFIG option.
>
> I do not like this patch.
Thanks Masahiro -- yeah, I can see how it makes sense for C host
programs, and consistency with those may be best, even if it is not
used for core infrastructure in the case of Rust.
Do you think it would be OK if we do it only for everything else, i.e.
no host programs? That covers most of the Rust things so far and would
have helped with the warning I linked above (which is why I would like
to change this -- one can pass the flag manually, of course, but
having more targets affected by `CONFIG_WERROR` means more developers
will have it enabled and thus notice earlier).
(I am also thinking whether it could make sense to eventually
explicitly mark the C host programs that would be exempt from
`CONFIG_WERROR` so that we could apply it to everything else -- I
guess it could be easy to get wrong and/or forget when new ones are
added.)
Cheers,
Miguel
Powered by blists - more mailing lists