Re: [PATCH] gpu: nova: fix rust-analyzer generation

From: Alexandre Courbot

Date: Wed Jul 01 2026 - 21:09:31 EST


On Wed Jul 1, 2026 at 9:36 PM JST, Onur Özkan wrote:
> On Wed, 01 Jul 2026 15:40:51 +0900
> Alexandre Courbot <acourbot@xxxxxxxxxx> wrote:
>
>> The rust-analyzer generator script recognizes a crate when its
>> corresponding `.o` appears in the Rust source file's immediate `Makefile`
>> or `Kbuild` file.
>>
>> Commit ca524e273c43 ("gpu: build nova-core and nova-drm from
>> drivers/gpu/Makefile") moves the build rules for `nova-core` and
>> `nova-drm` into `drivers/gpu/Makefile`, which results in the generator
>> script ignoring these crates.
>
> So this regression shows that generate_rust_analyzer.py should probably handle
> this case better e.g. by checking and understanding parent build rules too.

Ideally yes - I expect that this is something the improved build system
will handle correctly. The current Nova build rules are a temporary
workaround, so I wanted to keep this "fix" as small as possible as it
will also be reverted eventually.

>
>>
>> Fix this by naming the crates' module as a comment in their respective
>> `Makefile`; this is enough for the script to pick them up and restore
>> `rust-analyzer` functionality on them.
>>
>> Fixes: ca524e273c43 ("gpu: build nova-core and nova-drm from drivers/gpu/Makefile")
>> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
>
> That said, this is a reasonable quick fix for the current generator as it fixes
> the rust-analyzer functionality for nova, so:
>
> Reviewed-by: Onur Özkan <work@xxxxxxxxxxxxx>

Thanks!