scripts: generate_rust_analyzer: provide `cfg`s for `core` and `alloc`
authorMartin Rodriguez Reboredo <yakoyoku@gmail.com>
Fri, 4 Aug 2023 17:14:39 +0000 (14:14 -0300)
committerMiguel Ojeda <ojeda@kernel.org>
Sun, 20 Aug 2023 20:54:32 +0000 (22:54 +0200)
commit4f353e0d1282dfe6b8082290fe8e606c5739a954
treed822f40bfc60cb2e70ceea32dfde61da79a149e5
parent08ab786556ff177086ce93b26daf2a58edd10968
scripts: generate_rust_analyzer: provide `cfg`s for `core` and `alloc`

Both `core` and `alloc` have their `cfgs` (such as `no_rc`) missing
in `rust-project.json`.

To remedy this, pass the flags to `generate_rust_analyzer.py` for
them to be added to a dictionary where each key corresponds to
a crate and each value to a list of `cfg`s. The dictionary is then
used to pass the `cfg`s to each crate in the generated file (for
`core` and `alloc` only).

Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Link: https://lore.kernel.org/r/20230804171448.54976-1-yakoyoku@gmail.com
[ Removed `Suggested-by` as discussed in mailing list. ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/Makefile
scripts/generate_rust_analyzer.py