diff mbox series

[RFC,v17,06/14] meson: add target_user_arch

Message ID 20210210152859.25920-7-cfontana@suse.de
State New
Headers show
Series i386 cleanup PART 2 | expand

Commit Message

Claudio Fontana Feb. 10, 2021, 3:28 p.m. UTC
the lack of target_user_arch makes it hard to fully leverage the
build system in order to separate user code from softmmu code.

Provide it, so that we can avoid the proliferation of #ifdef
in target code.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
---
 meson.build | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index e3ef660670..a1582e0cbc 100644
--- a/meson.build
+++ b/meson.build
@@ -1733,6 +1733,7 @@  modules = {}
 hw_arch = {}
 target_arch = {}
 target_softmmu_arch = {}
+target_user_arch = {}
 
 ###############
 # Trace files #
@@ -2129,6 +2130,10 @@  foreach target : target_dirs
     abi = config_target['TARGET_ABI_DIR']
     target_type='user'
     qemu_target_name = 'qemu-' + target_name
+    t = target_user_arch[arch].apply(config_target, strict: false)
+    arch_srcs += t.sources()
+    arch_deps += t.dependencies()
+
     if 'CONFIG_LINUX_USER' in config_target
       base_dir = 'linux-user'
       target_inc += include_directories('linux-user/host/' / config_host['ARCH'])