From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22063239E9A for ; Mon, 24 Nov 2025 02:42:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763952136; cv=none; b=IXnucQuz8Bp2q1jOpeytWKYTks/nmPQxU/Yh251zXbn2nQntAn+T1M86MdHqDbH8/iHjpyBDAslOGMSCwfvl+04EFo39Vs5sWdTgBtEM4kMaVtGB9HqUtHhs/ZnjM7WRv8SMx+JnEgGV8Ktof+p9m6JU5BSTnxzirKNaaSaGEoE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763952136; c=relaxed/simple; bh=2oubYlvBWNBRgKO7pXURZQwzgGqjYFhnanOmPBQoWHk=; h=From:Message-ID:Date:MIME-Version:Subject:To:Cc:References: In-Reply-To:Content-Type; b=JS3exqTp4FbcglXcRObjid0tqM9dErkdg+MMjtJG8RmDKtdt6b4GkcoMOAWqrgAK0bjVgkgmefNYWMOfysFy5+w8aACf/3+gkiAD2Bt/nlcBFu2o9om1pvO3B4yBLcQXAdmtEZFlqfv9sEVGf5hReNpoSO3bF+Innk4gBtVg0dQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YQWi2for; arc=none smtp.client-ip=209.85.210.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YQWi2for" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-7bc248dc16aso2758560b3a.0 for ; Sun, 23 Nov 2025 18:42:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763952134; x=1764556934; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:from:to :cc:subject:date:message-id:reply-to; bh=DvmpkL2pKIFur0kWWa5PPAZWhiSzKqhwPQTIwYGauJ4=; b=YQWi2forbBqyO0pBJUMDQ5BiPQFH+WFMP6wB3ieyauAv1DkKmx3CART3dAT3mhSLhD mxHSkxtvtTeVv3iScROovCQztiuSVlZUTIWBoIwq+gty0n0HyvLFj82X/xXRLM8Xl+Le te6Oq6eEYj9UWGRk93gudUMr1Ols+RQahKAmfgG6jhFqyCajK1DGNcH5VlJIB4gl0kgC SGT2bMG9C7pQA+LdSR3nlQLTvzMf8fafOK9yX5YJgiGLafvgjOE9LQighOddP5spp702 VOtNh4mHBebSMZ+kHaO05ASwT9ublC9E5/xEZBu1HCvi9rJNKyKepC3VC9lfXTPASVbJ 3WRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763952134; x=1764556934; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DvmpkL2pKIFur0kWWa5PPAZWhiSzKqhwPQTIwYGauJ4=; b=BJ4TlVfX1N1rjA7LgubU3UMcceDdYL0dBrvWK/P2UQZQuHk1z83isN7Kolixk/aUle MSZI9WwLshhLZOKubBHn73+3OCzHIckfMn0ZZAkCmKl80dPuLz+ybcRyj9K2S7laPZcf NbTO1Pf2c9gLvVeMzYRjWzp7RIaBL29u9fEMsdQsZ68NUDdzVJpW+BAG1RqfRzIzxr4j n5kjP6FOLN4Qdar5zyArOpDX/m9zf8RbSXHQzOGVIzAfW4taFMxxHt+SnAYaWayp2nN4 2cTBv28jZnxRNfupEPgSsNi4WSODTWtHILlbbzIM2AIDMNAeMXLaN7oHx6k8EgIhS5p3 pFjw== X-Forwarded-Encrypted: i=1; AJvYcCVvjDAEtTcwQfMblQd5Pu/ZyFyHoPVYzFUI71HdhZajKU6M0qqtaRcCB2IIU33g34IsluUXSmO+yFDug/Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yy3wPRKeKbtKpWA0LPfxR6E0DH2WccYAjnl7M8WJk5bvujxZ9my 986bAzCOZdHPis/xlopfGWAmkGcrYnxo3EbYUNaxXe8Sdxb2LHRRIBqa X-Gm-Gg: ASbGnctolLo3IoOqYeQYJwQBPRkyJYxAZs3CoUA8ijfi3e7V59JjgZ8tu1T/pAaHW/+ Nq6HH88bPBgervgpjpg26LfwA9FQKDDE75TrAgOlsHlsASkpBKYlyZAh87ASGGZo5yBYTcV/GjE CFMgUskGhFxRZzI3V82VsLp7SrNN1F0TYeO4KM+SS9DmhOA1AU5lqv4F2U9Yu8w1WYx7n2UlcSr s2CKRqlfuuB3/P/z+9c+0AVT6U49p+lUMULi8rI8ijjwESqA+We5Q6jWqD+MXTY/CsRIDFzKFcs 3i8it3Ew328/hIgw8YFUxZ8ERQlxLqqr5urO2kJUitNx1qB7IGYMDnVPAdX0nJkqpGxSS5k7CBj NOBp9LObCPV16GE9XWHCcVd1ICDX3VJg6yy5SFJ7TTzcbT+AJKgnlkyayXqP6c8It+WldTfWjG2 vpgbXUsKYN9maXSxx13hJ6OQ== X-Google-Smtp-Source: AGHT+IG1OvJ94QxB/0B5dUPh/eDPLHHoAzRcr/MIUUe+KPUWPK22zAbeB/idFdwPhcR+hgsYZWBgug== X-Received: by 2002:a05:7022:f50e:b0:11b:38c:5370 with SMTP id a92af1059eb24-11c9d712e3dmr5385199c88.20.1763952133924; Sun, 23 Nov 2025 18:42:13 -0800 (PST) Received: from [192.168.1.209] ([65.87.8.213]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11c93e55af3sm67907613c88.7.2025.11.23.18.42.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Nov 2025 18:42:13 -0800 (PST) From: Asuna Yang X-Google-Original-From: Asuna Yang Message-ID: Date: Mon, 24 Nov 2025 10:42:04 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 3/4] rust: add a Kconfig function to test for support of bindgen options To: Miguel Ojeda Cc: Nathan Chancellor , Nicolas Schier , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Nick Desaulniers , Bill Wendling , Justin Stitt , Nicolas Schier , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Vivian Wang , Han Gao , Jason Montleon , Conor Dooley , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, llvm@lists.linux.dev, linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org References: <20251124-gcc-rust-v4-v4-0-4e06e07421ae@gmail.com> <20251124-gcc-rust-v4-v4-3-4e06e07421ae@gmail.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/24/25 9:48 AM, Miguel Ojeda wrote: > More importantly, should we just have a separate function for backend > flags? That would be easier and would avoid having to use the > environment variable, if I understand the commit message here > correctly. And, anyway, it is actually the only function we need so > far. You are right, separated might be better. Another reason is, in `scripts/Makefile.compiler`, there is a set of functions with the same name provided for use by Makefile. Since we currently do not need to check for bindgen options in Makefile, I didn't add function for bindgen there. If we add it in the future, the `bindgen-option` function in `Kconfig.include` will correspond to the `bindgen-option-yn` function in `Makefile.compiler`, and `bindgen-option` function in `Makefile.compiler` will return the selected option instead of yn. If we don't separate them now, for consistency, in `Makefile.compiler`, `$(call bindgen-option,-- --some-flag-a,-- --some-flag-b)` will return an option prefixed with --, which makes it difficult to use. I will separate them into two functions in the next revision, `bindgen-option` and `bindgen-backend-option` (or `bindgen-cc-option`? Which one do you prefer?).