aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2021-06-24 12:38:05 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-07-09 18:20:27 +0200
commit5ebbfecc3e6fa443a506ec5fe65f0ca98973d404 (patch)
tree15cbc45b58d5a9f30b702c841b1481236b34c23f /meson.build
parentf5723ab66560a10f8461ac223e3d8369c10dc964 (diff)
modules: generate modinfo.c
Add script to generate C source with a small database containing the module meta-data. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jose R. Ziviani <jziviani@suse.de> Message-Id: <20210624103836.2382472-4-kraxel@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 12 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index ff580f1f80..7b827f7caa 100644
--- a/meson.build
+++ b/meson.build
@@ -2242,6 +2242,7 @@ subdir('tests/qtest/fuzz')
########################
modinfo_collect = find_program('scripts/modinfo-collect.py')
+modinfo_generate = find_program('scripts/modinfo-generate.py')
modinfo_files = []
block_mods = []
@@ -2267,7 +2268,6 @@ foreach d, list : modules
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
@@ -2280,6 +2280,17 @@ foreach d, list : modules
endforeach
endforeach
+if enable_modules
+ modinfo_src = custom_target('modinfo.c',
+ output: 'modinfo.c',
+ input: modinfo_files,
+ command: [modinfo_generate, '@INPUT@'],
+ capture: true)
+ modinfo_lib = static_library('modinfo', modinfo_src)
+ modinfo_dep = declare_dependency(link_whole: modinfo_lib)
+ softmmu_ss.add(modinfo_dep)
+endif
+
nm = find_program('nm')
undefsym = find_program('scripts/undefsym.py')
block_syms = custom_target('block.syms', output: 'block.syms',