]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: kbuild: emit dep-info into $(depfile) directly
authorGary Guo <gary@garyguo.net>
Tue, 24 Feb 2026 07:29:56 +0000 (15:29 +0800)
committerMiguel Ojeda <ojeda@kernel.org>
Fri, 6 Mar 2026 00:43:03 +0000 (01:43 +0100)
commite174dd14bf0beac811a5201e370ab26ce8c67f23
treee034bf3d389bf3bfa43f3b69e82e8905df3a3fc6
parent3ac88a9948792b092a4b11323e2abd1ecbe0cc68
rust: kbuild: emit dep-info into $(depfile) directly

After commit 295d8398c67e ("kbuild: specify output names separately for
each emission type from rustc"), the preferred pattern is to ask rustc to
emit dependency 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-info 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.

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

Reported-by: Onur Özkan <work@onurozkan.dev>
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@garyguo.net>
Tested-by: Onur Özkan <work@onurozkan.dev>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260224072957.214979-1-gary@garyguo.net
[ Reworded for a couple of typos. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/Makefile