meson: Allow system binaries to not have target-specific units

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é <[email protected]>
Reviewed-by: Pierrick Bouvier <[email protected]>
Message-ID: <[email protected]>
This commit is contained in:
Philippe Mathieu-Daudé committed 2026-01-12 23:47:56 +01:00
1 parent 5a17a542ac
commit 83d5db95d3
1 file changed
+5 -3
+5 -3
View 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)