@samitouri / QOSamiQemu / commits / 08777c11a7

meson: Allow building with empty target_arch[] source set

Complete commit 83d5db95d38 ("meson: Allow system binaries to not have target-specific units") with yet another guard, allowing empty target_arch[] source sets for some targets. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Message-Id: <20260506133216.18730-1-philmd@linaro.org>

Philippe Mathieu-Daudé committed Apr 2, 2026 at 19:34 UTC 08777c11a7ee5c8ecc556f0e9301d24d2c613a21
1 file changed +5 -3
meson.build
+5 -3
@@ -4332,9 +4332,11 @@ foreach target : target_dirs
4332 arch_srcs += files('target-info-stub.c')
4333 endif
4334
4335 - t = target_arch[target_base_arch].apply(config_target, strict: false)
4336 - arch_srcs += t.sources()
4337 - arch_deps += t.dependencies()
4335 + if target_base_arch in target_arch
4336 + t = target_arch[target_base_arch].apply(config_target, strict: false)
4337 + arch_srcs += t.sources()
4338 + arch_deps += t.dependencies()
4339 + endif
4340
4341 target_common = common_ss.apply(config_target, strict: false)
4342 objects = [common_all.extract_objects(target_common.sources())]