diff mbox series

[07/26] meson: Introduce meson_user_arch source set for arch-specific user-mode

Message ID 20210418163134.1133100-8-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series target/mips: Re-org to allow KVM-only builds | expand

Commit Message

Philippe Mathieu-Daudé April 18, 2021, 4:31 p.m. UTC
Similarly to the 'target_softmmu_arch' source set which allows
to restrict target-specific sources to system emulation, add
the equivalent 'meson_user_arch' set for user emulation.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Richard Henderson April 18, 2021, 7:09 p.m. UTC | #1
On 4/18/21 9:31 AM, Philippe Mathieu-Daudé wrote:
> Similarly to the 'target_softmmu_arch' source set which allows
> to restrict target-specific sources to system emulation, add
> the equivalent 'meson_user_arch' set for user emulation.

You didn't call it meson_user_arch in the end.  Last minute change?
Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   meson.build | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/meson.build b/meson.build
> index d8bb1ec5aa9..1ffdc9e6c4e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1751,6 +1751,7 @@
>   hw_arch = {}
>   target_arch = {}
>   target_softmmu_arch = {}
> +target_user_arch = {}
>   
>   ###############
>   # Trace files #
> @@ -2168,6 +2169,11 @@
>       abi = config_target['TARGET_ABI_DIR']
>       target_type='user'
>       qemu_target_name = 'qemu-' + target_name
> +    if arch in target_user_arch
> +      t = target_user_arch[arch].apply(config_target, strict: false)
> +      arch_srcs += t.sources()
> +      arch_deps += t.dependencies()
> +    endif
>       if 'CONFIG_LINUX_USER' in config_target
>         base_dir = 'linux-user'
>         target_inc += include_directories('linux-user/host/' / config_host['ARCH'])
>
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index d8bb1ec5aa9..1ffdc9e6c4e 100644
--- a/meson.build
+++ b/meson.build
@@ -1751,6 +1751,7 @@ 
 hw_arch = {}
 target_arch = {}
 target_softmmu_arch = {}
+target_user_arch = {}
 
 ###############
 # Trace files #
@@ -2168,6 +2169,11 @@ 
     abi = config_target['TARGET_ABI_DIR']
     target_type='user'
     qemu_target_name = 'qemu-' + target_name
+    if arch in target_user_arch
+      t = target_user_arch[arch].apply(config_target, strict: false)
+      arch_srcs += t.sources()
+      arch_deps += t.dependencies()
+    endif
     if 'CONFIG_LINUX_USER' in config_target
       base_dir = 'linux-user'
       target_inc += include_directories('linux-user/host/' / config_host['ARCH'])