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