From 83d5db95d3890cdc600901ae3d5d1c9c72dedfcb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 6 Jan 2026 22:47:12 +0100 Subject: [PATCH] meson: Allow system binaries to not have target-specific units MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As we are moving toward a single binary, targets might end without any target-specific objects (all objects being in the 'common' source set). Allow this by checking the target_system_arch[] dictionary contains the target key before using it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Message-ID: <20260106235333.22752-2-philmd@linaro.org> --- meson.build | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 56df08c10e..c58007291a 100644 --- a/meson.build +++ b/meson.build @@ -4284,9 +4284,11 @@ foreach target : target_dirs endif if target.endswith('-softmmu') target_type='system' - t = target_system_arch[target_base_arch].apply(config_target, strict: false) - arch_srcs += t.sources() - arch_deps += t.dependencies() + if target_base_arch in target_system_arch + t = target_system_arch[target_base_arch].apply(config_target, strict: false) + arch_srcs += t.sources() + arch_deps += t.dependencies() + endif hw_dir = target_name == 'sparc64' ? 'sparc64' : target_base_arch if hw_arch.has_key(hw_dir) -- 2.47.3