Re: [PATCH] kbuild: rust: drop the obsolete libclang stack-init probe
From: Miguel Ojeda
Date: Tue Dec 01 2026 - 11:46:35 EST
On Wed, Nov 25, 2026 at 11:32 AM Peder Bergan via B4 Relay
<devnull+peder.bergan.gmail.com@xxxxxxxxxx> wrote:
>
> From: Peder Bergan <peder.bergan@xxxxxxxxx>
>
> For Rust-enabled GCC builds with CONFIG_INIT_STACK_ALL_ZERO, the Rust
> Makefile runs bindgen to check whether libclang needs the old enabler
> for -ftrivial-auto-var-init=zero. LLVM 16 made the flag usable on its own,
> and the Rust toolchain check already requires libclang 17.0.1 or newer
> (18.0.0 on LoongArch).
>
> Drop the obsolete enabler and the bindgen invocation that selects it.
> On this rust-next base, median warm make prepare time fell from 0.72 s
> to 0.49 s over ten runs per version on x86-64 with GCC 16.2.1, libclang
> 23.1.5 and bindgen 0.73.2. For both GCC and Clang, the generated kernel,
> helper and UAPI bindings matched byte for byte before and after the
> change.
>
> Signed-off-by: Peder Bergan <peder.bergan@xxxxxxxxx>
Applied to `rust-next` -- thanks everyone!
Cheers,
Miguel