A previous commit wrongly skipped including the generated modinfo in case hw_arch dictionary ends up being empty. Fix that by adding an empty source set in dictionary in this case.
Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3280 Fixes: e8efe5ff4 (meson: Do not try to build module for empty per-target hw/ directory) Signed-off-by: Pierrick Bouvier <[email protected]> --- meson.build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index a84f14258b0..ca33b0f2ce1 100644 --- a/meson.build +++ b/meson.build @@ -3958,10 +3958,6 @@ if enable_modules if target.endswith('-softmmu') config_target = config_target_mak[target] arch = config_target['TARGET_NAME'] == 'sparc64' ? 'sparc64' : config_target['TARGET_BASE_ARCH'] - if not hw_arch.has_key(arch) - continue - endif - config_devices_mak = target + '-config-devices.mak' modinfo_src = custom_target('modinfo-' + target + '.c', output: 'modinfo-' + target + '.c', @@ -3971,6 +3967,11 @@ if enable_modules modinfo_lib = static_library('modinfo-' + target + '.c', modinfo_src) modinfo_dep = declare_dependency(link_with: modinfo_lib) + + if not hw_arch.has_key(arch) + hw_arch += {arch: ss.source_set()} + endif + hw_arch[arch].add(modinfo_dep) endif endforeach -- 2.47.3
