aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-11-21 13:52:48 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-01-05 16:20:14 +0100
commitbf964322d643f03650806c33a951fc7d74649190 (patch)
tree67303dbf5614b1562c0eeec83ae95aa2981c2445 /meson.build
parent05470c3979d5485003e129ff4b0c2ef98af91d86 (diff)
meson: Allow building binary with no target-specific files in hw/
Allow building a qemu-system-foo binary with target-agnostic only HW models. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231121203129.67999-1-philmd@linaro.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build8
1 files changed, 5 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 5a2582776c..371edafae6 100644
--- a/meson.build
+++ b/meson.build
@@ -3771,9 +3771,11 @@ foreach target : target_dirs
arch_deps += t.dependencies()
hw_dir = target_name == 'sparc64' ? 'sparc64' : target_base_arch
- hw = hw_arch[hw_dir].apply(config_target, strict: false)
- arch_srcs += hw.sources()
- arch_deps += hw.dependencies()
+ if hw_arch.has_key(hw_dir)
+ hw = hw_arch[hw_dir].apply(config_target, strict: false)
+ arch_srcs += hw.sources()
+ arch_deps += hw.dependencies()
+ endif
arch_srcs += config_devices_h[target]
link_args += ['@block.syms', '@qemu.syms']