From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 512B4FF5134 for ; Tue, 7 Apr 2026 19:39:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AD0E010E4B7; Tue, 7 Apr 2026 19:39:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="AGI2ToMR"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6820E10E4B5; Tue, 7 Apr 2026 19:39:52 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 1B2D6404AC; Tue, 7 Apr 2026 19:39:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7475BC116C6; Tue, 7 Apr 2026 19:39:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775590792; bh=CGezKdEqDPdo1kPCwuUYGddzvOOGAGtk2UxFXojRw1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AGI2ToMRaUBAZVtejPVUq+e50ea/lP7efouoxy/kxmec44WkUdcbfxeDKvy+NBH1I lekyMnxmXkrJZAdHX/bmB0KrMI9UqXmhXX0qmMpjy1OD2MwCaAi/NEpcCnRciWPR0z 0IgKByy8pEpqVSWX9WfKXZypizebnKZYmpngAkydT7MQb1VgAbohRz7fq668Q6dvOv 4660d/sfvox9Dh9lgwP54A/lPT6vSgoFoxAFw5dZQ9BQAAq9Km8NNFG1j1WAnmmicb c4NpgbDr10Fi7rCCwJSS5OsYI8o9fCq0+bmyvf/XwaGmyXmBcai9/7Z4ZpfPUqkGKv /KEaSzJFvOboA== Date: Tue, 7 Apr 2026 21:35:26 +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 32/33] rust: kbuild: support global per-version flags 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-33-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260405235309.418950-33-ojeda@kernel.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Apr 06, 2026 at 01:53:08AM +0200, Miguel Ojeda wrote: > Sometimes it is useful to gate global Rust flags per compiler version. > For instance, we may want to disable a lint that has false positives in > a single version [1]. > > We already had helpers like `rustc-min-version` for that, which we use > elsewhere, but we cannot currently use them for `rust_common_flags`, > which contains the global flags for all Rust code (kernel and host), > because `rustc-min-version` depends on `CONFIG_RUSTC_VERSION`, which > does not exist when `rust_common_flags` is defined. > > Thus, to support that, introduce `rust_common_flags_per_version`, > defined after the `include/config/auto.conf` inclusion (where > `CONFIG_RUSTC_VERSION` becomes available), and append it to > `rust_common_flags`, `KBUILD_HOSTRUSTFLAGS` and `KBUILD_RUSTFLAGS`. > > In addition, move the expansion of `HOSTRUSTFLAGS` to the same place, > so that users can also override per-version flags [2]. > > Link: https://lore.kernel.org/rust-for-linux/CANiq72mWdFU11GcCZRchzhy0Gi1QZShvZtyRkHV2O+WA2uTdVQ@mail.gmail.com/ [1] > Link: https://lore.kernel.org/rust-for-linux/CANiq72mTaA2tjhkLKf0-2hrrrt9rxWPgy6SfNSbponbGOegQvA@mail.gmail.com/ [2] > Link: https://patch.msgid.link/20260307170929.153892-1-ojeda@kernel.org > Signed-off-by: Miguel Ojeda > --- > Makefile | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > Acked-by: Nicolas Schier -- Nicolas From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A441FF5138 for ; Tue, 7 Apr 2026 19:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZCfG/jfA+D5AoHV2pj2gsYh5ExiqYQ3qfJApUuuSP20=; b=JAfb6Ywux+O1kN YYZfmBGgyNarTwIestJPK7x4GLe4t2eXJMLtAnGxH4xjX68CuNTkxAxF9Yc3Vxi6IJcNSqTqlZHkl Fitfvxat/0i6QOg14Jd4zrXyyggbzYgx3kyxLNmTYaVDGzm927QtAb3N0TLPnvtoTT0ih+z9odJyl zWGRmWDCrJnk0MVMpl7xnK2pHbGhigg9t/l/yAsCIMPXboxi3svP94CdC3ndNDN8jiQTZ8xBpmAZD CH1yZZDBGjyhP5kvRGgzPJ6IaW47dS9QS96vN65jo3q96epyu30vhr8/Ez7oQ/fBM+WyrdFWKJKzn ukSQDNF4Ke66oGAe0umg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1wACHE-00000007IJy-3Nuy; Tue, 07 Apr 2026 19:39:56 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1wACHB-00000007IHB-2Q5y; Tue, 07 Apr 2026 19:39:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 1B2D6404AC; Tue, 7 Apr 2026 19:39:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7475BC116C6; Tue, 7 Apr 2026 19:39:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775590792; bh=CGezKdEqDPdo1kPCwuUYGddzvOOGAGtk2UxFXojRw1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AGI2ToMRaUBAZVtejPVUq+e50ea/lP7efouoxy/kxmec44WkUdcbfxeDKvy+NBH1I lekyMnxmXkrJZAdHX/bmB0KrMI9UqXmhXX0qmMpjy1OD2MwCaAi/NEpcCnRciWPR0z 0IgKByy8pEpqVSWX9WfKXZypizebnKZYmpngAkydT7MQb1VgAbohRz7fq668Q6dvOv 4660d/sfvox9Dh9lgwP54A/lPT6vSgoFoxAFw5dZQ9BQAAq9Km8NNFG1j1WAnmmicb c4NpgbDr10Fi7rCCwJSS5OsYI8o9fCq0+bmyvf/XwaGmyXmBcai9/7Z4ZpfPUqkGKv /KEaSzJFvOboA== Date: Tue, 7 Apr 2026 21:35:26 +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 32/33] rust: kbuild: support global per-version flags 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-33-ojeda@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20260405235309.418950-33-ojeda@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260407_123953_664979_49BD2F3E X-CRM114-Status: GOOD ( 17.36 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Mon, Apr 06, 2026 at 01:53:08AM +0200, Miguel Ojeda wrote: > Sometimes it is useful to gate global Rust flags per compiler version. > For instance, we may want to disable a lint that has false positives in > a single version [1]. > > We already had helpers like `rustc-min-version` for that, which we use > elsewhere, but we cannot currently use them for `rust_common_flags`, > which contains the global flags for all Rust code (kernel and host), > because `rustc-min-version` depends on `CONFIG_RUSTC_VERSION`, which > does not exist when `rust_common_flags` is defined. > > Thus, to support that, introduce `rust_common_flags_per_version`, > defined after the `include/config/auto.conf` inclusion (where > `CONFIG_RUSTC_VERSION` becomes available), and append it to > `rust_common_flags`, `KBUILD_HOSTRUSTFLAGS` and `KBUILD_RUSTFLAGS`. > > In addition, move the expansion of `HOSTRUSTFLAGS` to the same place, > so that users can also override per-version flags [2]. > > Link: https://lore.kernel.org/rust-for-linux/CANiq72mWdFU11GcCZRchzhy0Gi1QZShvZtyRkHV2O+WA2uTdVQ@mail.gmail.com/ [1] > Link: https://lore.kernel.org/rust-for-linux/CANiq72mTaA2tjhkLKf0-2hrrrt9rxWPgy6SfNSbponbGOegQvA@mail.gmail.com/ [2] > Link: https://patch.msgid.link/20260307170929.153892-1-ojeda@kernel.org > Signed-off-by: Miguel Ojeda > --- > Makefile | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > Acked-by: Nicolas Schier -- Nicolas _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0EFC8FF5136 for ; Tue, 7 Apr 2026 19:39:57 +0000 (UTC) Received: from kara.freedesktop.org (unknown [131.252.210.166]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5992410E4C4; Tue, 7 Apr 2026 19:39:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="AGI2ToMR"; dkim-atps=neutral Received: from kara.freedesktop.org (localhost [127.0.0.1]) by kara.freedesktop.org (Postfix) with ESMTP id 24A37456E3; Tue, 7 Apr 2026 19:28:20 +0000 (UTC) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=lists.freedesktop.org; s=20240201; t=1775590100; b=r0i3wprPJBSm1EXhZfVF+BuC3XuMxyAg29U2gw7WlkUmL+u0vyvs0BU7uQ+qgRDKtLk4u wOZ55PduiMDFUhx2MxnsZLBWBpZKdXcsI2L/BdYFjvUmnsFQKKgUaPww2cRHptcj/U9J3vK Zx0ZFBC05M6yY94vvCT3b2pTqdRcPMd8KG/7In9LE689emL78tujuZFSKcH7gzbnnTBLlrj 5YUMQSkHYha56GiHlo+33aQzAzbmj3m0kQEvH4+6Wm3QXzfScxmfTn2i1ooEupS7nb68B7p G+HyEN/mCmaec3FBV2OF5LTdn8VC6w4KI63ZiMYveTigyrT9iuAW/UkNaQbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.freedesktop.org; s=20240201; t=1775590100; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=yvp4ob6UyK2adw9kMtTEnv8rRH6zjHfiql6vcm02fn4=; b=Wo1ouEpcE8+kwAvG4t2G33wdB9CuV84qdPTLMOiQX6CMoho8JbJumUOGzi8irf9DMEyqz dZkiI2YWFVW0tSN+Xg7um0aR/3GSGSB0niWfcjITmbz/sQpARLKUGjtYzYiXrd+QzrrMai3 cQuked1LYVstHHaR1bUWTy6Pz6w473loDSQcJv2x4dwp425ogcpwByk5euNpRZr3ubEhkmM o4+HhT7hjQ9gVHm13Rs7hkiu3IlxR7b2XKn2DudRo+20Mhb+S84N51nKc8G/9M3Zpw4ykLL r+Y/tlw4VHzI6CEAkMs2O4ToPaI3wFupzLRksAb4ONOtkRgUBlxwjlVI4nTw== ARC-Authentication-Results: i=1; mail.freedesktop.org; dkim=pass header.d=kernel.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=kernel.org policy.dmarc=quarantine Authentication-Results: mail.freedesktop.org; dkim=pass header.d=kernel.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=kernel.org policy.dmarc=quarantine Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by kara.freedesktop.org (Postfix) with ESMTPS id 63C9043E5F for ; Tue, 7 Apr 2026 19:28:16 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6820E10E4B5; Tue, 7 Apr 2026 19:39:52 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 1B2D6404AC; Tue, 7 Apr 2026 19:39:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7475BC116C6; Tue, 7 Apr 2026 19:39:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775590792; bh=CGezKdEqDPdo1kPCwuUYGddzvOOGAGtk2UxFXojRw1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AGI2ToMRaUBAZVtejPVUq+e50ea/lP7efouoxy/kxmec44WkUdcbfxeDKvy+NBH1I lekyMnxmXkrJZAdHX/bmB0KrMI9UqXmhXX0qmMpjy1OD2MwCaAi/NEpcCnRciWPR0z 0IgKByy8pEpqVSWX9WfKXZypizebnKZYmpngAkydT7MQb1VgAbohRz7fq668Q6dvOv 4660d/sfvox9Dh9lgwP54A/lPT6vSgoFoxAFw5dZQ9BQAAq9Km8NNFG1j1WAnmmicb c4NpgbDr10Fi7rCCwJSS5OsYI8o9fCq0+bmyvf/XwaGmyXmBcai9/7Z4ZpfPUqkGKv /KEaSzJFvOboA== Date: Tue, 7 Apr 2026 21:35:26 +0200 From: Nicolas Schier To: Miguel Ojeda Subject: Re: [PATCH v2 32/33] rust: kbuild: support global per-version flags 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-33-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260405235309.418950-33-ojeda@kernel.org> Message-ID-Hash: DBYFM6VX4U7F6IQJBHBYEBFCX3QQ4MDE X-Message-ID-Hash: DBYFM6VX4U7F6IQJBHBYEBFCX3QQ4MDE X-MailFrom: nsc@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Nathan Chancellor , Danilo Krummrich , Andreas Hindborg , Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Courbot , 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 X-Mailman-Version: 3.3.8 Precedence: list List-Id: Nouveau development list Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, Apr 06, 2026 at 01:53:08AM +0200, Miguel Ojeda wrote: > Sometimes it is useful to gate global Rust flags per compiler version. > For instance, we may want to disable a lint that has false positives in > a single version [1]. > > We already had helpers like `rustc-min-version` for that, which we use > elsewhere, but we cannot currently use them for `rust_common_flags`, > which contains the global flags for all Rust code (kernel and host), > because `rustc-min-version` depends on `CONFIG_RUSTC_VERSION`, which > does not exist when `rust_common_flags` is defined. > > Thus, to support that, introduce `rust_common_flags_per_version`, > defined after the `include/config/auto.conf` inclusion (where > `CONFIG_RUSTC_VERSION` becomes available), and append it to > `rust_common_flags`, `KBUILD_HOSTRUSTFLAGS` and `KBUILD_RUSTFLAGS`. > > In addition, move the expansion of `HOSTRUSTFLAGS` to the same place, > so that users can also override per-version flags [2]. > > Link: https://lore.kernel.org/rust-for-linux/CANiq72mWdFU11GcCZRchzhy0Gi1QZShvZtyRkHV2O+WA2uTdVQ@mail.gmail.com/ [1] > Link: https://lore.kernel.org/rust-for-linux/CANiq72mTaA2tjhkLKf0-2hrrrt9rxWPgy6SfNSbponbGOegQvA@mail.gmail.com/ [2] > Link: https://patch.msgid.link/20260307170929.153892-1-ojeda@kernel.org > Signed-off-by: Miguel Ojeda > --- > Makefile | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > Acked-by: Nicolas Schier -- Nicolas