@@ -52,30 +52,6 @@ supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', 'x86_64'
cpu = host_machine.cpu_family()
target_dirs = config_host['TARGET_DIRS'].split()
-have_linux_user = false
-have_bsd_user = false
-have_system = false
-foreach target : target_dirs
- 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 = get_option('tools') \
- .disable_auto_if(not have_system) \
- .allowed()
-have_ga = get_option('guest_agent') \
- .disable_auto_if(not have_system and not have_tools) \
- .require(targetos in ['sunos', 'linux', 'windows', 'freebsd', 'netbsd', 'openbsd'],
- error_message: 'unsupported OS for QEMU guest agent') \
- .allowed()
-enable_modules = get_option('modules') \
- .require(targetos != 'windows',
- error_message: 'Modules are not available for Windows') \
- .require(not get_option('prefer_static'),
- error_message: 'Modules are incompatible with static linking') \
- .allowed()
-have_block = have_system or have_tools
############
# Programs #
@@ -576,6 +552,34 @@ have_tpm = get_option('tpm') \
.require(targetos != 'windows', error_message: 'TPM emulation only available on POSIX systems') \
.allowed()
+# type of binaries to build
+have_linux_user = false
+have_bsd_user = false
+have_system = false
+foreach target : target_dirs
+ 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 = get_option('tools') \
+ .disable_auto_if(not have_system) \
+ .allowed()
+have_ga = get_option('guest_agent') \
+ .disable_auto_if(not have_system and not have_tools) \
+ .require(targetos in ['sunos', 'linux', 'windows', 'freebsd', 'netbsd', 'openbsd'],
+ error_message: 'unsupported OS for QEMU guest agent') \
+ .allowed()
+
+have_block = have_system or have_tools
+enable_modules = get_option('modules') \
+ .require(targetos != 'windows',
+ error_message: 'Modules are not available for Windows') \
+ .require(not get_option('prefer_static'),
+ error_message: 'Modules are incompatible with static linking') \
+ .allowed()
+
# vhost
have_vhost_user = get_option('vhost_user') \
.disable_auto_if(targetos != 'linux') \
Not entirely possible for option that depend on compiler or dependency checks, but it's a start. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- meson.build | 52 ++++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 24 deletions(-)