]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: kbuild: simplify `--cfg` handling
authorMiguel Ojeda <ojeda@kernel.org>
Mon, 24 Nov 2025 15:18:14 +0000 (16:18 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 24 Nov 2025 16:15:35 +0000 (17:15 +0100)
commit1181c974421818ff7318e3a211c87b5dd437c13e
tree464cc6e9910c42efa7e0459f943bfc3099a5da8c
parent46e58a9637ec6493b142b788595eed627b4973b7
rust: kbuild: simplify `--cfg` handling

We need to handle `cfg`s in both `rustc` and `rust-analyzer`, and in
future commits some of those contain double quotes, which complicates
things further.

Thus, instead of removing the `--cfg ` part in the rust-analyzer
generation script, have the `*-cfgs` variables contain just the actual
`cfg`, and use that to generate the actual flags in `*-flags`.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Tested-by: Gary Guo <gary@garyguo.net>
Tested-by: Jesung Yang <y.j3ms.n@gmail.com>
Link: https://patch.msgid.link/20251124151837.2184382-3-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/Makefile
scripts/generate_rust_analyzer.py