From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 3656929A0; Mon, 6 Jan 2025 06:08:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736143730; cv=none; b=P4RR0COmuMH15+D36eKL1cWumHqTCWU4cdbxzNUaLgoIrxl+OR0V0G7bSs78LFQzf3+ycH3bKpcdIIFj97tHFF1lu64CD7E+u9uApHZXypXhDCsspRTSa9V6C5SFbqEcVZwmYHKzbKE+MnhaI7G6JDXFp81+fvnvGpxammqHsQY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736143730; c=relaxed/simple; bh=JpnT6XDiDi5v7yU1l/uSYIFMfZG6zHH+8eWd9ppJpT8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ODuZWVx1qHUEq5SgNwUIKv+fl+t3Lq6i8AKFiO4Bngf6k4Jp02bDD7UKy9LAIW4esB6Pd4kQgU1QDI2ZGfFmpAxKUcIzNdAytV8N2TGuVL3m+KDAJpnUiWQS18rGdFdEbXMR3XZUFlqhMuXer6Nrujwe4uLAqTSmAe6Gv6d7sec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=pcTvClkp; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="pcTvClkp" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description; bh=466vvuHwmWKlZeIUy/KmSmUiE8XU5/pjhwbYX0vXyBo=; b=pcTvClkpFlq/IwHF4RwHFIFUJc JPkNzFBavlHll+VCJ3h0+frT6KgwNmkopeZhSV/TLeyirjRqrq8snGqiEhC/E0bzxpUb1wsvBcydy cAMOG6fFcmisnxJ4G3vJ1Kau68dVJ3ozg4E8SdybnCLz7IWVCchU5+BOiJ4FAQ+9zRkAffulas93B j/1oNSE1OxHu0xaDSIznq+8KnQOji7uaFeGiMMQtoA4Qsr3KBBLNyGJDAbqNjDgGm7ScaLRHjvcxc 3Tp3ujhvAvAa243S6u1Z/hxINTYe+qNvxK/ZMmYq+M5n1D7xft2H1d0Fl9YDbTkS4qGzdvV/o12UN +hb9td7g==; Received: from [50.53.2.24] (helo=[192.168.254.17]) by desiato.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tUgHr-00000008ru5-05JL; Mon, 06 Jan 2025 06:08:27 +0000 Message-ID: Date: Sun, 5 Jan 2025 22:08:14 -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 v2 2/3] kbuild: rust: provide an option to inline C helpers into Rust To: Gary Guo , Miguel Ojeda , Alex Gaynor , Boqun Feng , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Masahiro Yamada , Nicolas Schier , Andrew Morton , Dirk Behme , Tamir Duberstein , Christian Brauner , Martin Rodriguez Reboredo , Paul Moore , Wedson Almeida Filho , "Steven Rostedt (Google)" , Matt Gilbride , Danilo Krummrich , Eder Zulian , Filipe Xavier Cc: rust-for-linux@vger.kernel.org, llvm@lists.linux.dev, Kees Cook , Daniel Xu , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250105194054.545201-1-gary@garyguo.net> <20250105194054.545201-3-gary@garyguo.net> Content-Language: en-US From: Randy Dunlap In-Reply-To: <20250105194054.545201-3-gary@garyguo.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/5/25 11:40 AM, Gary Guo wrote: > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index f3d723705879..8a8834128f13 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -3253,6 +3253,20 @@ config RUST_KERNEL_DOCTESTS > > If unsure, say N. > > +config RUST_INLINE_HELPERS > + bool "Inline C helpers into Rust crates" > + depends on RUST && RUSTC_CLANG_LLVM_COMPATIBLE > + help > + Links C helpers into with Rust crates through LLVM IR. cannot parse "into with". > + > + If this option is enabled, instead of generating object files directly, > + rustc is asked to produce LLVM IR, which is then linked together with > + the LLVM IR of C helpers, before object file is generated. > + > + This requires a matching LLVM version for Clang and rustc. > + > + If unsure, say N. > + > endmenu # "Rust" -- ~Randy