Re: [PATCH v3 2/2] kbuild: rust: provide an option to inline C helpers into Rust
From: Miguel Ojeda
Date: Wed Apr 09 2025 - 17:06:21 EST
On Wed, Apr 9, 2025 at 10:41 PM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> In addition, from what we discussed in the call, it would be nice to
> have some performance numbers compared to not enabling it, as well as
> compared to cross-language LTO.
>
> It would also help to know which users out there need/want to have this.
A couple more points, if we end up landing this:
- We discussed that we may want this behind `EXPERT`.
- We should probably mention in the config description that using an
exact LLVM version is recommended even if matching just the major
"should" work.
By the way, here is the link that we sometimes mentioned in the
past: https://doc.rust-lang.org/rustc/linker-plugin-lto.html#toolchain-compatibility
- We may want to mention that one needs `llvm-link` and `llvm-as` in
the config description.
It should not be a big deal, since they typically are available in
the usual `llvm` package of distributions (e.g. Fedora and Ubuntu),
and the kernel.org combined Rust+LLVM toolchains have them already
since June thanks to Nathan.
Cheers,
Miguel