[PATCH v4 3/4] rust: add a Kconfig function to test for support of bindgen options
Miguel Ojeda
miguel.ojeda.sandonis at gmail.com
Sun Nov 23 17:48:32 PST 2025
On Mon, Nov 24, 2025 at 1:23 AM Asuna Yang <spriteovo at gmail.com> wrote:
>
> Use the `BINDGEN_EXTRA_CLANG_ARGS` environment variable to pass the
> `--target` option for cross compiling, so that the function can be used
> to test both bindgen options and bindgen backend options.
It seems this explains part of how it works, but not what the commit
adds and why, i.e. could we start with "Add `rustc-bindgen-option`..."
etc.?
By the way, shouldn't this just be called `bindgen-option`? Up to the
Kbuild team.
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.
> +# Return y if the Rust bindgen supports <flag>, n otherwise
Maybe just "y if bindgen supports"?
Thanks!
Cheers,
Miguel
More information about the linux-riscv
mailing list