[PATCH v4 1/4] rust: export BINDGEN_TARGET from a separate Makefile
Miguel Ojeda
miguel.ojeda.sandonis at gmail.com
Sun Nov 23 17:40:22 PST 2025
On Mon, Nov 24, 2025 at 1:23 AM Asuna Yang <spriteovo at gmail.com> wrote:
>
> A subsequent commit will add a new function `rust-bindgen-option` to
> `scripts/Kconfig.include`. The bindgen backend requires the `--target`
> option for cross compiling, but variable `BINDGEN_TARGET` in
> `rust/Makefile` cannot be exported to `scripts/Kconfig.include`.
Please end with another paragraph saying what the commit does, e.g.
"Thus move the variable to a new `Makefile` that can then be imported
from the main `Makefile`" or similar.
Also, I am not sure if this should be called `Makefile.bindgen`, but I
guess it is fine as it is -- with the current name, the new file
should be covered by the `F: scripts/*rust*` rule in `MAINTAINERS`
already, so this looks OK, but please double-check it is the case.
Finally, is it possible to put this under `need-compiler` like
`Makefile.compiler`? I don't think we need to evaluate those options
for things like `make help`, but perhaps I am missing something.
Please see commit 805b2e1d427a ("kbuild: include Makefile.compiler
only when compiler is needed").
Thanks!
Cheers,
Miguel
More information about the linux-riscv
mailing list