Re: [PATCH] kbuild: AutoFDO: Enable -salvage-stale-profile

From: Miguel Ojeda

Date: Thu Nov 05 2026 - 15:05:19 EST


On Thu, Nov 5, 2026 at 2:46 AM Douglas Anderson <dianders@xxxxxxxxxxxx> wrote:
>
> Enable LLVM stale profile salvaging (-salvage-stale-profile, supported
> since LLVM 17) for C, Rust, and ThinLTO builds when

> + RUSTFLAGS_AUTOFDO_CLANG += -Cllvm-args=-salvage-stale-profile

I double-checked that the flag was introduced in LLVM 17 as the cover
letter mentions, and so it is likely fine given the Rust 1.85.0
compiler (i.e. our minimum) supports LLVM 18 as the minimum major
version, but if the patch goes ahead in the end, then we should make
sure it works well with that one (or probably you already did, in
which case, please ignore this!).

Cheers,
Miguel