From nobody Wed Apr 1 22:11:55 2026 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 4B0C73F9F30; Wed, 1 Apr 2026 11:47:38 +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=1775044058; cv=none; b=W5rTyHohFGfOqc0DioDa3NjHAQx3Vs2/9NnoSPiQlRQS+FEw3qqwVbtfHIjF44vURSr7DE2rUfq/AkmArvn+VHgiY0bj+EuWCpQKEWPFsuc/I8OjoFJlDy6EKp1fAAT0B4k0hv2JGW+1+2a05vA+DEliIxVoO2cO7ox2p2fIud0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775044058; c=relaxed/simple; bh=ry8aHALQKoUAVgl8vkVGGnGKhW3biqQ3zE20M4qwJgI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Bx8u+0CMZ/X8hgDO4r3rfkxnQJ63a/WuV+iCJSIPfSyQJeMUI5yaCJbvM8jtRWl38aRr5T0rcizTLUwbaqB3GPDbMINMUKRD+OazZDzTWGKL5u5fzFsEQqxokV0b4RyRTvqxGxamoZMfgDS1bwLhtOFUxRWbjKVqmUnZQuithrM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sflZSueu; 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="sflZSueu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0309C4CEF7; Wed, 1 Apr 2026 11:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775044058; bh=ry8aHALQKoUAVgl8vkVGGnGKhW3biqQ3zE20M4qwJgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sflZSueuLuu1bWL2KEvq3OCBI7g2AOgQPjJLOPksg31c1MoUcPjU3PoOhqsrY78NL qLTZ5oOs5TEYly4ggal/VwhAsfF451NsyaNr6GAdAbOY/JzOwZeaDZ9elT0AfNQS7D mARg0SQMYwQv2vNVOe3YsrTYDZEK2B9QqRmx5l0suW3yJQKno/WpxtQkmgksvMwzck Ma796ZKDd5Ou4YuvDUAv86QHFr3dqOr1gMbbh0EOfUXAbhTkB6IantJJ9aOIrNopN8 GeHT6XQFerRjV/gPrSVDV7wN8GmQU1oXsIBd7ARAcLgUwzDJtoq//xQFaYbBbif1av AKvnVswAymJZg== From: Miguel Ojeda To: Miguel Ojeda , Nathan Chancellor , Nicolas Schier , 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 , =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , Todd Kjos , Christian Brauner , Carlos Llamas , Alice Ryhl , Jonathan Corbet Cc: Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , 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, linux-arm-kernel@lists.infradead.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: [PATCH 08/33] rust: kbuild: simplify `--remap-path-prefix` workaround Date: Wed, 1 Apr 2026 13:45:15 +0200 Message-ID: <20260401114540.30108-9-ojeda@kernel.org> In-Reply-To: <20260401114540.30108-1-ojeda@kernel.org> References: <20260401114540.30108-1-ojeda@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" With the minimum version bump in place, `rustdoc` now always recognizes the `--remap-path-prefix` flag. In addition, the Internal Compiler Error that the comment mentions [1] was fixed in Rust 1.87.0 [2], so we still need to skip the flag for the normal `rustdoc` case, but not for `--test` since the ICE does not reproduce there -- please see commit 2c8725c1dca3 ("rust: kbuild: skip `--remap-path-prefix` for `rustdoc`"). Thus update the comment and remove the skipping of the flag for the `--test` case. Note that commit dda135077ecc ("rust: build: remap path to avoid absolute path") re-landed the `--remap-path-prefix` flag (together with `--remap-path-scope`), so we keep the workaround, i.e. an alternative could have been to simply delete the skip entirely, but since we still have it and it will be needed when this gets merged, let's keep it. Link: https://github.com/rust-lang/rust/issues/138520 [1] Link: https://github.com/rust-lang/rust/pull/138556 [2] Signed-off-by: Miguel Ojeda --- rust/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rust/Makefile b/rust/Makefile index 193cf06eea64..708530ee3613 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -142,10 +142,9 @@ rustdoc_modifiers_workaround :=3D $(if $(call rustc-mi= n-version,108800),-Cunsafe-a # Similarly, for doctests (https://github.com/rust-lang/rust/issues/146465= ). doctests_modifiers_workaround :=3D $(rustdoc_modifiers_workaround)$(if $(c= all rustc-min-version,109100),$(comma)sanitizer) =20 -# `rustc` recognizes `--remap-path-prefix` since 1.26.0, but `rustdoc` only -# since Rust 1.81.0. Moreover, `rustdoc` ICEs on out-of-tree builds since = Rust -# 1.82.0 (https://github.com/rust-lang/rust/issues/138520). Thus workaroun= d both -# issues skipping the flag. The former also applies to `RUSTDOC TK`. +# `rustdoc` ICEs on out-of-tree builds in Rust < 1.87.0 +# (https://github.com/rust-lang/rust/issues/138520). Thus workaround the +# issue skipping the flag. quiet_cmd_rustdoc =3D RUSTDOC $(if $(rustdoc_host),H, ) $< cmd_rustdoc =3D \ OBJTREE=3D$(abspath $(objtree)) \ @@ -333,7 +332,7 @@ quiet_cmd_rustdoc_test_kernel =3D RUSTDOC TK $< rm -rf $(objtree)/$(obj)/test/doctests/kernel; \ mkdir -p $(objtree)/$(obj)/test/doctests/kernel; \ OBJTREE=3D$(abspath $(objtree)) \ - $(RUSTDOC) --test $(filter-out --remap-path-prefix=3D%,$(rust_flags)) \ + $(RUSTDOC) --test $(rust_flags) \ -L$(objtree)/$(obj) --extern ffi --extern pin_init \ --extern kernel --extern build_error --extern macros \ --extern bindings --extern uapi \ --=20 2.53.0