Re: [PATCH] rust: kbuild: emit dep-info into $(depfile) directly

From: Miguel Ojeda

Date: Tue Mar 03 2026 - 21:40:07 EST


On Tue, Feb 24, 2026 at 8:30 AM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> After commit 295d8398c67e ("kbuild: specify output names separately for
> each emission type from rustc"), the preferred pattern is to ask rustc to
> emit depedency information into $(depfile) directly, and after commit
> 2185242faddd ("kbuild: remove sed commands after rustc rules"), the
> post-processing to remove comments is no longer necessary as fixdep can
> handle comments directly. Thus, emit dep-ifno into $(depfile) directly and
> remove the mv and sed invocation.
>
> This fixes the issue where a non-ignored .d file is emitted during
> compilation and removed shortly afterwards.
>
> Reported-by: Onur Özkan <work@xxxxxxxxxxxxx>
> Closes: https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/syn.20artifact.20being.20tracked.20by.20git/with/575467879
> Fixes: 7dbe46c0b11d ("rust: kbuild: add proc macro library support")
> Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>

Applied to `rust-fixes` -- thanks everyone!

[ Like Gary mentioned in Zulip, this likely happened due to rebasing
the builds part of the old `syn` work I had. - Miguel ]

[ Reworded for a couple of typos. - Miguel ]

Also Cc: stable@xxxxxxxxxxxxxxx

Cheers,
Miguel