Re: [PATCH] rust: build: remap path to avoid absolute path

From: Miguel Ojeda

Date: Sat Feb 07 2026 - 10:22:46 EST


On Sat, Feb 7, 2026 at 3:44 PM Gary Guo <gary@xxxxxxxxxx> wrote:
>
> So, fix this by remap all absolute paths to srctree to relative path
> instead.

In case it matters to Kbuild, we had a relatively recent revert
related to this flag:

dbdffaf50ff9 ("kbuild, rust: use -fremap-path-prefix to make paths relative")
8cf5b3f83614 ("Revert "kbuild, rust: use -fremap-path-prefix to make
paths relative"")

https://lore.kernel.org/rust-for-linux/20250511-kbuild-revert-file-prefix-map-v1-0-9ba640c8411e@xxxxxxxxxxxxxx/

>From what I see in the thread (but I didn't get a confirmation back
then), the issue was some developers relying on invoking the debugger
in a different working directory than the `srctree`.

Thanks Gary!

Cheers,
Miguel