summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini2020-09-21 10:37:49 +0200
committerPaolo Bonzini2020-10-03 14:18:56 +0200
commitfdb75aeff7c212e1afaaa3a43c36a0985fdc1e44 (patch)
tree38894777a8f516fac239fb3dc3f6e9bcb8aa4c92 /meson.build
parentconfigure: remove useless config-target.mak symbols (diff)
downloadqemu-fdb75aeff7c212e1afaaa3a43c36a0985fdc1e44.tar.gz
qemu-fdb75aeff7c212e1afaaa3a43c36a0985fdc1e44.tar.xz
qemu-fdb75aeff7c212e1afaaa3a43c36a0985fdc1e44.zip
configure: remove target configuration
The config-target.mak files are small constant, we can therefore just write them down explicitly. This removes a pretty large part of the configure script, including the whole logic to detect which accelerators are supported by each target. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build27
1 files changed, 23 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 4de1524941..743a6504a7 100644
--- a/meson.build
+++ b/meson.build
@@ -723,13 +723,25 @@ kconfig_external_symbols = [
]
ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
+default_targets = 'CONFIG_DEFAULT_TARGETS' in config_host
+actual_target_dirs = []
foreach target : target_dirs
config_target = { 'TARGET_NAME': target.split('-')[0] }
if target.endswith('linux-user')
- assert(targetos == 'linux')
+ if targetos != 'linux'
+ if default_targets
+ continue
+ endif
+ error('Target @0@ is only available on a Linux host'.format(target))
+ endif
config_target += { 'CONFIG_LINUX_USER': 'y' }
elif target.endswith('bsd-user')
- assert('CONFIG_BSD' in config_host)
+ if 'CONFIG_BSD' not in config_host
+ if default_targets
+ continue
+ endif
+ error('Target @0@ is only available on a BSD host'.format(target))
+ endif
config_target += { 'CONFIG_BSD_USER': 'y' }
elif target.endswith('softmmu')
config_target += { 'CONFIG_SOFTMMU': 'y' }
@@ -753,8 +765,14 @@ foreach target : target_dirs
have_accel = true
endif
endforeach
- assert(have_accel)
+ if not have_accel
+ if default_targets
+ continue
+ endif
+ error('No accelerator available for target @0@'.format(target))
+ endif
+ actual_target_dirs += target
config_target += keyval.load('default-configs/targets' / target + '.mak')
foreach k, v: disassemblers
@@ -816,6 +834,7 @@ foreach target : target_dirs
endif
config_target_mak += {target: config_target}
endforeach
+target_dirs = actual_target_dirs
# This configuration is used to build files that are shared by
# multiple binaries, and then extracted out of the "common"
@@ -1519,7 +1538,7 @@ if config_host.has_key('CONFIG_MODULES')
endif
summary_info += {'host CPU': cpu}
summary_info += {'host endianness': build_machine.endian()}
-summary_info += {'target list': config_host['TARGET_DIRS']}
+summary_info += {'target list': ' '.join(target_dirs)}
summary_info += {'gprof enabled': config_host.has_key('CONFIG_GPROF')}
summary_info += {'sparse enabled': meson.get_compiler('c').cmd_array().contains('cgcc')}
summary_info += {'strip binaries': get_option('strip')}