]> Git Repo - qemu.git/commitdiff
meson: *-user: only descend into *-user when configured
authorWarner Losh <[email protected]>
Fri, 8 Oct 2021 22:47:37 +0000 (16:47 -0600)
committerWarner Losh <[email protected]>
Mon, 18 Oct 2021 18:51:39 +0000 (12:51 -0600)
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[email protected]>
Message-Id: <20210926220103.1721355[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Warner Losh <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Reviewed-by: Kyle Evans <[email protected]>
bsd-user/meson.build
linux-user/meson.build
meson.build

index 0369549340844d6c7b79ac4b570624fda774c47c..5378f56f71c2ed9b698a4bd09a457e0fb349383b 100644 (file)
@@ -1,3 +1,7 @@
+if not have_bsd_user
+   subdir_done()
+endif
+
 bsd_user_ss.add(files(
   'bsdload.c',
   'elfload.c',
index 9549f81682d586595a5845a282601e3ef1482768..bf62c13e378957087adc1d44e585bb14e83dd369 100644 (file)
@@ -1,3 +1,7 @@
+if not have_linux_user
+   subdir_done()
+endif
+
 linux_user_ss.add(files(
   'elfload.c',
   'exit.c',
index 6b7487b725198e70b96b7aae333f16c35b16def9..5e7946776d7ba6d8864a13b32305e5b444057502 100644 (file)
@@ -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
This page took 0.041775 seconds and 4 git commands to generate.