On 16/06/21 11:16, Gerd Hoffmann wrote:
I was almost giving up... but it looks like the result of
extract_all_objects(recursive: true) can be passed to custom_target(). Then
you can match it after compile_commands.json's "output" key.

Seems the custom_target commands do not land in compile_commands.json.

No, they don't.

The idea was expressed a bit too concisely. :) I was thinking of using extract_all_objects on the module static library, passing the result to modinfo-collect, and looking up the names in compile_commands.json.

Paolo

But I have figured meanwhile that looking for the target name in the
command line works reliable.  That will will match
-DCONFIG_TARGET="${target}-config-target.h".

Current WIP patch below, seems to work nicely.  Whole patch series needs
an overhaul now ...


Reply via email to