From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42C4F30CDB6; Tue, 7 Apr 2026 19:40:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775590803; cv=none; b=Ub+oIDPL7EtyuPwaIDFdnaMevy0sPpZ9LpEmcBhUtK+zen3lKm5nr2pANNOt8wM5q8c5A7UyADn/KajH2h4bf2yXDsTqXbrYdRGoyokZrTPcMCeOcIazSwX/2MkOtbuxt0ZBCcXi+t7g7nJFhfINCMnzyDaii0yDOQj+UYzwYyg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775590803; c=relaxed/simple; bh=G6kWDg5ZKjWvzVWKZlcYhQ5fam5iGV3sa+XLqVTs0uY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LcHK0LUwsxd8cd6t71pdUKq9ccVpVhZj2zOjuHY6MEFmTg5tp7O5JQm6KmiNTnhHCdzdQLNdBUSA5F65iKwUdfc0Oywu6imcbDn+fWox7ctFvihKLLgzBmZXx50KV4JdKIEhA0/JJtvxkkLcaC9YRO6DlORxx64iLAHJReTt28w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sDMsUKs1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sDMsUKs1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20F94C2BC9E; Tue, 7 Apr 2026 19:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775590802; bh=G6kWDg5ZKjWvzVWKZlcYhQ5fam5iGV3sa+XLqVTs0uY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sDMsUKs11clmLqRSYOHdYemC/6eCCuTs/nd+pMdQ4HYBrZ2RMECvxE6SXi3Cq7Qt2 Vq2KJvfW5GfXXZgHejEo9PnFH8x8Op63ZSvbJ0vvCU+be1qdWGNKDkx6MVC2iXkJUM qJwNyNeAg2v+RkrnDQoXDazkT2Endo1x/TFg5/uKx/qUeKnEug+ZIa1nMoI5aLlOEY qeo71REji+J04wTIEZliW+iwogjU+a6RnJJQAR1UJJBmXx/1Uxx/C0aQtgyu1LZY3r MsOztoq00b7hebIqtbESUzLc+vPI1CSIyx11Yg+4g+gy6/+6M0uFALPOC0AaMDWpzZ Kfy0Fs+ExLZRQ== Date: Tue, 7 Apr 2026 21:39:30 +0200 From: Nicolas Schier To: Miguel Ojeda Cc: Nathan Chancellor , Danilo Krummrich , Andreas Hindborg , Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Courbot , David Airlie , Simona Vetter , Brendan Higgins , David Gow , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Christian Brauner , Carlos Llamas , Alice Ryhl , Jonathan Corbet , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Trevor Gross , rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org, Lorenzo Stoakes , Vlastimil Babka , "Liam R . Howlett" , Uladzislau Rezki , linux-block@vger.kernel.org, moderated for non-subscribers , Alexandre Ghiti , linux-riscv@lists.infradead.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Rae Moar , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Shuah Khan , linux-doc@vger.kernel.org Subject: Re: [PATCH v2 01/33] rust: kbuild: remove `--remap-path-prefix` workarounds Message-ID: Mail-Followup-To: Nicolas Schier , Miguel Ojeda , Nathan Chancellor , Danilo Krummrich , Andreas Hindborg , Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Courbot , David Airlie , Simona Vetter , Brendan Higgins , David Gow , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Christian Brauner , Carlos Llamas , Alice Ryhl , Jonathan Corbet , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Trevor Gross , rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org, Lorenzo Stoakes , Vlastimil Babka , "Liam R . Howlett" , Uladzislau Rezki , linux-block@vger.kernel.org, moderated for non-subscribers , Alexandre Ghiti , linux-riscv@lists.infradead.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Rae Moar , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Shuah Khan , linux-doc@vger.kernel.org References: <20260405235309.418950-1-ojeda@kernel.org> <20260405235309.418950-2-ojeda@kernel.org> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260405235309.418950-2-ojeda@kernel.org> On Mon, Apr 06, 2026 at 01:52:37AM +0200, Miguel Ojeda wrote: > Commit 8cf5b3f83614 ("Revert "kbuild, rust: use -fremap-path-prefix > to make paths relative"") removed `--remap-path-prefix` from the build > system, so the workarounds are not needed anymore. > > Thus remove them. > > Note that the flag has landed again in parallel in this cycle in > commit dda135077ecc ("rust: build: remap path to avoid absolute path"), > together with `--remap-path-scope=macro` [1]. However, they are gated on > `rustc-option-yn, --remap-path-scope=macro`, which means they are both > only passed starting with Rust 1.95.0 [2]: > > `--remap-path-scope` is only stable in Rust 1.95, so use `rustc-option` > to detect its presence. This feature has been available as > `-Zremap-path-scope` for all versions that we support; however due to > bugs in the Rust compiler, it does not work reliably until 1.94. I opted > to not enable it for 1.94 as it's just a single version that we missed. > > In turn, that means the workarounds removed here should not be needed > again (even with the flag added again above), since: > > - `rustdoc` now recognizes the `--remap-path-prefix` flag since Rust > 1.81.0 [3] (even if it is still an unstable feature [4]). > > - The Internal Compiler Error [5] that the comment mentions was fixed in > Rust 1.87.0 [6]. We tested that was the case in a previous version > of this series by making the workaround conditional [7][8]. > > ...which are both older versions than Rust 1.95.0. > > We will still need to skip `--remap-path-scope` for `rustdoc` though, > since `rustdoc` does not support that one yet [4]. > > Link: https://github.com/rust-lang/rust/issues/111540 [1] > Link: https://github.com/rust-lang/rust/pull/147611 [2] > Link: https://github.com/rust-lang/rust/pull/107099 [3] > Link: https://doc.rust-lang.org/nightly/rustdoc/unstable-features.html#--remap-path-prefix-remap-source-code-paths-in-output [4] > Link: https://github.com/rust-lang/rust/issues/138520 [5] > Link: https://github.com/rust-lang/rust/pull/138556 [6] > Link: https://lore.kernel.org/rust-for-linux/20260401114540.30108-9-ojeda@kernel.org/ [7] > Link: https://lore.kernel.org/rust-for-linux/20260401114540.30108-10-ojeda@kernel.org/ [8] > Signed-off-by: Miguel Ojeda > --- > rust/Makefile | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > Acked-by: Nicolas Schier -- Nicolas