]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
meson: Allow system binaries to not have target-specific units
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 6 Jan 2026 21:47:12 +0000 (22:47 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 12 Jan 2026 22:47:56 +0000 (23:47 +0100)
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é <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20260106235333.22752-2-philmd@linaro.org>

meson.build

index 56df08c10eda63a4ed0bd6816a8cde96f85db73d..c58007291a8c5bff6c45c093a88860b2290d68a1 100644 (file)
@@ -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)