Re: [PATCH] rust-analyzer: update generate_rust_analyzer to pass cfg to macros crate

From: Andreas Hindborg

Date: Mon May 11 2026 - 01:00:57 EST


Andreas Hindborg <a.hindborg@xxxxxxxxxx> writes:

<cut>

>> Directionally I think this patch is incorrect because the macros crate
>> is a host-side crate and generated_cfg is for target-side cfgs.
>
> We might want to differentiate macro implementations based on kernel
> configuration, or as in our case, skip compilation of certain macros
> when they are not used in the kernel build.

Also, the `macros` crate is actually built with these configuration
attributes applied. It is only logical that the `rust-analyzer`
configuration reflect how we build the crate.


Best regards,
Andreas Hindborg