diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2021-06-24 12:38:04 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-07-09 18:20:27 +0200 |
commit | f5723ab66560a10f8461ac223e3d8369c10dc964 (patch) | |
tree | dffd7b55455ab1b99d56ed9fc10f3d9e1333f890 /meson.build | |
parent | 22524c10c489ed7c20be2f5878157a64095e5734 (diff) |
modules: collect module meta-data
Add script to collect the module meta-data from the source code,
store the results in *.modinfo files.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jose R. Ziviani <jziviani@suse.de>
Message-Id: <20210624103836.2382472-3-kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 9cd966a86b..ff580f1f80 100644 --- a/meson.build +++ b/meson.build @@ -2241,6 +2241,9 @@ subdir('tests/qtest/fuzz') # Library dependencies # ######################## +modinfo_collect = find_program('scripts/modinfo-collect.py') +modinfo_files = [] + block_mods = [] softmmu_mods = [] foreach d, list : modules @@ -2254,6 +2257,19 @@ foreach d, list : modules else softmmu_mods += sl endif + if module_ss.sources() != [] + # FIXME: Should use sl.extract_all_objects(recursive: true) as + # input. Sources can be used multiple times but objects are + # unique when it comes to lookup in compile_commands.json. + # Depnds on a mesion version with + # https://github.com/mesonbuild/meson/pull/8900 + modinfo_files += custom_target(d + '-' + m + '.modinfo', + output: d + '-' + m + '.modinfo', + input: module_ss.sources(), + capture: true, + build_by_default: true, # to be removed when added to a target + command: [modinfo_collect, '@INPUT@']) + endif else if d == 'block' block_ss.add_all(module_ss) |