summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorWarner Losh2021-10-09 00:47:37 +0200
committerWarner Losh2021-10-18 20:51:39 +0200
commitdda2da6c94484b85d28fe7c29f7fee562deaf177 (patch)
treecd7ddd9d255d016725cdf7e640f051fd29d43987 /meson.build
parentbsd-user/mmap.c: assert that target_mprotect cannot fail (diff)
downloadqemu-dda2da6c94484b85d28fe7c29f7fee562deaf177.tar.gz
qemu-dda2da6c94484b85d28fe7c29f7fee562deaf177.tar.xz
qemu-dda2da6c94484b85d28fe7c29f7fee562deaf177.zip
meson: *-user: only descend into *-user when configured
To increase flexibility, only descend into *-user when that is configured. This allows *-user to selectively include directories based on the host OS which may not exist on all hosts. Adopt Paolo's suggestion of checking the configuration in the directories that know about the configuration. Message-Id: <20210926220103.1721355-2-f4bug@amsat.org> Message-Id: <20210926220103.1721355-3-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Warner Losh <wlosh@bsdimp.com> Acked-by: Paolo Bonzini <pbonzinni@redhat.com> Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 8 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 6b7487b725..5e7946776d 100644
--- a/meson.build
+++ b/meson.build
@@ -40,12 +40,15 @@ config_host_data = configuration_data()
genh = []
target_dirs = config_host['TARGET_DIRS'].split()
-have_user = false
+have_linux_user = false
+have_bsd_user = false
have_system = false
foreach target : target_dirs
- have_user = have_user or target.endswith('-user')
+ have_linux_user = have_linux_user or target.endswith('linux-user')
+ have_bsd_user = have_bsd_user or target.endswith('bsd-user')
have_system = have_system or target.endswith('-softmmu')
endforeach
+have_user = have_linux_user or have_bsd_user
have_tools = 'CONFIG_TOOLS' in config_host
have_block = have_system or have_tools
@@ -2595,10 +2598,11 @@ subdir('bsd-user')
subdir('linux-user')
subdir('ebpf')
-bsd_user_ss.add(files('gdbstub.c'))
+common_ss.add(libbpf)
+
specific_ss.add_all(when: 'CONFIG_BSD_USER', if_true: bsd_user_ss)
-linux_user_ss.add(files('gdbstub.c', 'thunk.c'))
+linux_user_ss.add(files('thunk.c'))
specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss)
# needed for fuzzing binaries