[PATCH] meson: Allow building with empty target_arch[] source set

Philippe Mathieu-Daudé posted 1 patch 2 weeks, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260506133216.18730-1-philmd@linaro.org
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
meson.build | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
[PATCH] meson: Allow building with empty target_arch[] source set
Posted by Philippe Mathieu-Daudé 2 weeks, 5 days ago
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>
---
 meson.build | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 4176d020c21..987f33bacee 100644
--- a/meson.build
+++ b/meson.build
@@ -4332,9 +4332,11 @@ foreach target : target_dirs
     arch_srcs += files('target-info-stub.c')
   endif
 
-  t = target_arch[target_base_arch].apply(config_target, strict: false)
-  arch_srcs += t.sources()
-  arch_deps += t.dependencies()
+  if target_base_arch in target_arch
+    t = target_arch[target_base_arch].apply(config_target, strict: false)
+    arch_srcs += t.sources()
+    arch_deps += t.dependencies()
+  endif
 
   target_common = common_ss.apply(config_target, strict: false)
   objects = [common_all.extract_objects(target_common.sources())]
-- 
2.53.0


Re: [PATCH] meson: Allow building with empty target_arch[] source set
Posted by Pierrick Bouvier 2 weeks, 5 days ago
On 5/6/2026 6:32 AM, Philippe Mathieu-Daudé wrote:
> 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>
> ---
>  meson.build | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

Re: [PATCH] meson: Allow building with empty target_arch[] source set
Posted by Manos Pitsidianakis 2 weeks, 5 days ago
On Wed, May 6, 2026 at 4:32 PM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> 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>

>  meson.build | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 4176d020c21..987f33bacee 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -4332,9 +4332,11 @@ foreach target : target_dirs
>      arch_srcs += files('target-info-stub.c')
>    endif
>
> -  t = target_arch[target_base_arch].apply(config_target, strict: false)
> -  arch_srcs += t.sources()
> -  arch_deps += t.dependencies()
> +  if target_base_arch in target_arch
> +    t = target_arch[target_base_arch].apply(config_target, strict: false)
> +    arch_srcs += t.sources()
> +    arch_deps += t.dependencies()
> +  endif
>
>    target_common = common_ss.apply(config_target, strict: false)
>    objects = [common_all.extract_objects(target_common.sources())]
> --
> 2.53.0
>