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 0247435C1B7; Thu, 29 Jan 2026 22:41:27 +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=1769726487; cv=none; b=lCHeDkr/x1F4lb1iGOrV6H4B0O2ebknwy03ATghnaXKf8k4Mr+SU4XBmEwTN8LneHGCZbIpT7dUO0HQiKx5jYTJcebx3Jy9tYOev8K3JGCB8oPgBJvbUTPrSCFDqGq1GHIUm99l62t+wRK41XX/Eh76jiEQVoESSseF4450Kra4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769726487; c=relaxed/simple; bh=0Cgvwko1h1R9ooOUPVRWvfyKzy4YXcZJFJeK7aS3gGs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PkvWIUguyFEw8jts+Qimt4G0WXM7S+fVgAr67ffrLVGRIciJgI2TMATkOt4tPB7//Rma06s1T6U2muZrOtHnyDiDaC9cgnCQLcLjy6bd+QB2krXwuV+y28mWktl35VT8pA2vhtmLrImgn5b0+EOhygHQ2IPgqxo5CTr8FCSS4qc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TjQySNhE; 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="TjQySNhE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84E11C4CEF7; Thu, 29 Jan 2026 22:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769726486; bh=0Cgvwko1h1R9ooOUPVRWvfyKzy4YXcZJFJeK7aS3gGs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TjQySNhEktK8AivnEQwrXUmQquAClQmbacRI5eShSk3gBiLELRT/J9iUCcCVmtmov YB0pVrvh9WDq2fXWvXWnd8hR9HOCGciPGhKTN/VzQ0Zybx2wzUuWdoNm1KocMbzzkD bEUZOkSfqS8eDTPDVAfSp5ezGNY20RrDR/YjnM+R8qKqXxCCV5eFC3perOqeKASXti axhfmyKuQzFZYNMbMVR5r5bwC0VEsX3yZDnn95lOlLy3j7zzTLLjwd3fAakqOi06is GuQpGCbwKdsWKY1BS7Rflr521ZyFgiHpZH/FNOiSl4zvqIbZJtUg/Hk0p8pWIixicY kGEOfRtf2blBg== Date: Thu, 29 Jan 2026 15:41:18 -0700 From: Nathan Chancellor To: Asuna Yang Cc: Nicolas Schier , Miguel Ojeda , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Nick Desaulniers , Bill Wendling , Justin Stitt , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Jonathan Corbet , Conor Dooley , Mingcong Bai , Han Gao , Vivian Wang , Jason Montleon , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, llvm@lists.linux.dev, linux-riscv@lists.infradead.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v6 3/4] rust: add a Kconfig function to test for support of bindgen options Message-ID: <20260129224118.GC844102@ax162> References: <20251230-gcc-rust-v5-v6-0-2ac86ba728c8@isrc.iscas.ac.cn> <20251230-gcc-rust-v5-v6-3-2ac86ba728c8@isrc.iscas.ac.cn> Precedence: bulk X-Mailing-List: rust-for-linux@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: <20251230-gcc-rust-v5-v6-3-2ac86ba728c8@isrc.iscas.ac.cn> On Tue, Dec 30, 2025 at 05:47:56PM +0100, Asuna Yang wrote: > Add a new `bindgen-backend-option` Kconfig function to test whether the > bindgen backend supports a given flag. > > A subsequent commit will use this function to test for RISC-V extension > flags. > > Signed-off-by: Asuna Yang > --- Acked-by: Nathan Chancellor > scripts/Kconfig.include | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include > index d42042b6c9e2..9954b8093fab 100644 > --- a/scripts/Kconfig.include > +++ b/scripts/Kconfig.include > @@ -78,3 +78,8 @@ rustc-llvm-version := $(shell,$(srctree)/scripts/rustc-llvm-version.sh $(RUSTC)) > # If you are testing for unstable features, consider testing RUSTC_VERSION > # instead, as features may have different completeness while available. > rustc-option = $(success,trap "rm -rf .tmp_$$" EXIT; mkdir .tmp_$$; $(RUSTC) $(1) --crate-type=rlib /dev/null --out-dir=.tmp_$$ -o .tmp_$$/tmp.rlib) > + > +# $(bindgen-backend-option,) > +# Return y if bindgen backend supports , n otherwise > +# For now, the backend refers only to libclang, so more specifically, this function tests whether the given flag is recognized by the libclang used by bindgen. > +bindgen-backend-option = $(success,$(BINDGEN) /dev/null -- -x c --target=$(BINDGEN_TARGET) $(1)) > > -- > 2.51.1 >