cc = meson.get_compiler('c')
all_languages = ['c']
-if add_languages('cpp', required: false, native: false)
+if targetos == 'windows' and add_languages('cpp', required: false, native: false)
all_languages += ['cpp']
cxx = meson.get_compiler('cpp')
endif
bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin']
supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux']
-supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv', 'x86', 'x86_64',
+supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', 'x86_64',
'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc64']
cpu = host_machine.cpu_family()
-# Unify riscv* to a single family.
-if cpu in ['riscv32', 'riscv64']
- cpu = 'riscv'
-endif
-
target_dirs = config_host['TARGET_DIRS'].split()
have_linux_user = false
have_bsd_user = false
host_arch = 'i386'
elif cpu == 'mips64'
host_arch = 'mips'
+elif cpu in ['riscv32', 'riscv64']
+ host_arch = 'riscv'
else
host_arch = cpu
endif
kvm_targets = ['ppc-softmmu', 'ppc64-softmmu']
elif cpu in ['mips', 'mips64']
kvm_targets = ['mips-softmmu', 'mipsel-softmmu', 'mips64-softmmu', 'mips64el-softmmu']
-elif cpu in ['riscv']
- kvm_targets = ['riscv32-softmmu', 'riscv64-softmmu']
+elif cpu in ['riscv32']
+ kvm_targets = ['riscv32-softmmu']
+elif cpu in ['riscv64']
+ kvm_targets = ['riscv64-softmmu']
else
kvm_targets = []
endif
if cpu in ['x86', 'x86_64', 'arm', 'aarch64']
# i386 emulator provides xenpv machine type for multiple architectures
accelerator_targets += {
- 'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu'],
+ 'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu', 'aarch64-softmmu'],
}
endif
if cpu in ['x86', 'x86_64']
accelerator_targets += {
- 'CONFIG_HAX': ['i386-softmmu', 'x86_64-softmmu'],
'CONFIG_HVF': ['x86_64-softmmu'],
'CONFIG_NVMM': ['i386-softmmu', 'x86_64-softmmu'],
'CONFIG_WHPX': ['i386-softmmu', 'x86_64-softmmu'],
if targetos == 'darwin'
# Disable attempts to use ObjectiveC features in os/object.h since they
# won't work when we're compiling with gcc as a C compiler.
- qemu_common_flags += '-DOS_OBJECT_USE_OBJC=0'
+ if compiler.get_id() == 'gcc'
+ qemu_common_flags += '-DOS_OBJECT_USE_OBJC=0'
+ endif
elif targetos == 'solaris'
# needed for CMSG_ macros in sys/socket.h
qemu_common_flags += '-D_XOPEN_SOURCE=600'
warn_flags += ['-Wthread-safety']
endif
-# Check that the C++ compiler exists and works with the C compiler.
-link_language = 'c'
-linker = cc
+# Set up C++ compiler flags
qemu_cxxflags = []
if 'cpp' in all_languages
qemu_cxxflags = ['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS'] + qemu_cflags
- if cxx.links(files('scripts/main.c'), args: qemu_cflags)
- link_language = 'cpp'
- linker = cxx
- else
- message('C++ compiler does not work with C compiler')
- message('Disabling C++-specific optional code')
- endif
endif
# clang does not support glibc + FORTIFY_SOURCE (is it still true?)
if get_option('whpx').allowed() and targetos == 'windows'
if get_option('whpx').enabled() and host_machine.cpu() != 'x86_64'
error('WHPX requires 64-bit host')
- elif cc.has_header('WinHvPlatform.h', required: get_option('whpx')) and \
- cc.has_header('WinHvEmulation.h', required: get_option('whpx'))
+ elif cc.has_header('winhvplatform.h', required: get_option('whpx')) and \
+ cc.has_header('winhvemulation.h', required: get_option('whpx'))
accelerators += 'CONFIG_WHPX'
endif
endif
accelerators += 'CONFIG_HVF'
endif
endif
-if get_option('hax').allowed()
- if get_option('hax').enabled() or targetos in ['windows', 'darwin', 'netbsd']
- accelerators += 'CONFIG_HAX'
- endif
-endif
if targetos == 'netbsd'
nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
if nvmm.found()
tcg_arch = host_arch
if get_option('tcg').allowed()
if host_arch == 'unknown'
- if get_option('tcg_interpreter')
- warning('Unsupported CPU @0@, will use TCG with TCI (slow)'.format(cpu))
- else
+ if not get_option('tcg_interpreter')
error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu))
endif
elif get_option('tcg_interpreter')
endif
if get_option('tcg_interpreter')
tcg_arch = 'tci'
- config_host += { 'CONFIG_TCG_INTERPRETER': 'y' }
elif host_arch == 'x86_64'
tcg_arch = 'i386'
elif host_arch == 'ppc64'
language: all_languages)
accelerators += 'CONFIG_TCG'
- config_host += { 'CONFIG_TCG': 'y' }
endif
if 'CONFIG_KVM' not in accelerators and get_option('kvm').enabled()
if enable_modules
gmodule = dependency('gmodule-export-2.0', version: glib_req_ver, required: true,
method: 'pkg-config')
-elif config_host.has_key('CONFIG_PLUGIN')
+elif get_option('plugins')
gmodule = dependency('gmodule-no-export-2.0', version: glib_req_ver, required: true,
method: 'pkg-config')
else
gdbus_codegen_error = '@0@ uses gdbus-codegen, which does not support control flow integrity'
endif
+xml_pp = find_program('scripts/xml-preprocess.py')
+
lttng = not_found
if 'ust' in get_option('trace_backends')
lttng = dependency('lttng-ust', required: true, version: '>= 2.1',
virgl = dependency('virglrenderer',
method: 'pkg-config',
required: get_option('virglrenderer'))
+ if virgl.found()
+ config_host_data.set('HAVE_VIRGL_D3D_INFO_EXT',
+ cc.has_member('struct virgl_renderer_resource_info_ext', 'd3d_tex2d',
+ prefix: '#include <virglrenderer.h>',
+ dependencies: virgl))
+ endif
endif
blkio = not_found
if not get_option('blkio').auto() or have_block
mpathlibs = [libudev]
mpathpersist = not_found
-mpathpersist_new_api = false
if targetos == 'linux' and have_tools and get_option('mpath').allowed()
- mpath_test_source_new = '''
+ mpath_test_source = '''
#include <libudev.h>
#include <mpath_persist.h>
unsigned mpath_mx_alloc_len = 1024;
multipath_conf = mpath_lib_init();
return 0;
}'''
- mpath_test_source_old = '''
- #include <libudev.h>
- #include <mpath_persist.h>
- unsigned mpath_mx_alloc_len = 1024;
- int logsink;
- int main(void) {
- struct udev *udev = udev_new();
- mpath_lib_init(udev);
- return 0;
- }'''
libmpathpersist = cc.find_library('mpathpersist',
required: get_option('mpath'))
if libmpathpersist.found()
endforeach
if mpathlibs.length() == 0
msg = 'Dependencies missing for libmpathpersist'
- elif cc.links(mpath_test_source_new, dependencies: mpathlibs)
- mpathpersist = declare_dependency(dependencies: mpathlibs)
- mpathpersist_new_api = true
- elif cc.links(mpath_test_source_old, dependencies: mpathlibs)
+ elif cc.links(mpath_test_source, dependencies: mpathlibs)
mpathpersist = declare_dependency(dependencies: mpathlibs)
else
msg = 'Cannot detect libmpathpersist API'
sdl_image = not_found
endif
if sdl.found()
- # work around 2.0.8 bug
- sdl = declare_dependency(compile_args: '-Wno-undef',
- dependencies: sdl,
- version: sdl.version())
+ # Some versions of SDL have problems with -Wundef
+ if not cc.compiles('''
+ #include <SDL.h>
+ #include <SDL_syswm.h>
+ int main(int argc, char *argv[]) { return 0; }
+ ''', dependencies: sdl, args: '-Werror=undef')
+ sdl = declare_dependency(compile_args: '-Wno-undef',
+ dependencies: sdl,
+ version: sdl.version())
+ endif
sdl_image = dependency('SDL2_image', required: get_option('sdl_image'),
method: 'pkg-config')
else
snappy = cc.find_library('snappy', has_headers: ['snappy-c.h'],
required: get_option('snappy'))
endif
-if snappy.found() and not linker.links('''
+if snappy.found() and not cc.links('''
#include <snappy-c.h>
int main(void) { snappy_max_compressed_length(4096); return 0; }''', dependencies: snappy)
snappy = not_found
endif
endif
if not xen.found()
- xen_tests = [ '4.11.0', '4.10.0', '4.9.0', '4.8.0', '4.7.1', '4.6.0', '4.5.0', '4.2.0' ]
+ xen_tests = [ '4.11.0', '4.10.0', '4.9.0', '4.8.0', '4.7.1' ]
xen_libs = {
'4.11.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn', 'xentoolcore' ],
'4.10.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn', 'xentoolcore' ],
'4.9.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
'4.8.0': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
'4.7.1': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', 'xenevtchn' ],
- '4.6.0': [ 'xenstore', 'xenctrl' ],
- '4.5.0': [ 'xenstore', 'xenctrl' ],
- '4.2.0': [ 'xenstore', 'xenctrl' ],
}
xen_deps = {}
foreach ver: xen_tests
error_message: 'Xen PCI passthrough requested but Xen not enabled') \
.require(targetos == 'linux',
error_message: 'Xen PCI passthrough not available on this platform') \
+ .require(cpu == 'x86' or cpu == 'x86_64',
+ error_message: 'Xen PCI passthrough not available on this platform') \
.allowed()
if get_option('malloc') == 'system'
has_malloc_trim = \
get_option('malloc_trim').allowed() and \
- cc.links('''#include <malloc.h>
- int main(void) { malloc_trim(0); return 0; }''')
+ cc.has_function('malloc_trim', prefix: '#include <malloc.h>')
else
has_malloc_trim = false
malloc = cc.find_library(get_option('malloc'), required: true)
endif
endif
-# Check whether the glibc provides statx()
-
gnu_source_prefix = '''
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
'''
-statx_test = gnu_source_prefix + '''
- #include <sys/stat.h>
- int main(void) {
- struct statx statxbuf;
- statx(0, "", 0, STATX_BASIC_STATS, &statxbuf);
- return 0;
- }'''
-has_statx = cc.links(statx_test)
+# Check whether the glibc provides STATX_BASIC_STATS
-# Check whether statx() provides mount ID information
+has_statx = cc.has_header_symbol('sys/stat.h', 'STATX_BASIC_STATS', prefix: gnu_source_prefix)
-statx_mnt_id_test = gnu_source_prefix + '''
- #include <sys/stat.h>
- int main(void) {
- struct statx statxbuf;
- statx(0, "", 0, STATX_BASIC_STATS | STATX_MNT_ID, &statxbuf);
- return statxbuf.stx_mnt_id;
- }'''
+# Check whether statx() provides mount ID information
-has_statx_mnt_id = cc.links(statx_mnt_id_test)
+has_statx_mnt_id = cc.has_header_symbol('sys/stat.h', 'STATX_MNT_ID', prefix: gnu_source_prefix)
have_vhost_user_blk_server = get_option('vhost_user_blk_server') \
.require(targetos == 'linux',
error_message: '-display dbus requires glib>=2.64') \
.require(gdbus_codegen.found(),
error_message: gdbus_codegen_error.format('-display dbus')) \
- .require(targetos != 'windows',
- error_message: '-display dbus is not available on Windows') \
.allowed()
have_virtfs = get_option('virtfs') \
config_host_data.set('CONFIG_ATTR', libattr.found())
config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_whitelist_in_tools'))
config_host_data.set('CONFIG_BRLAPI', brlapi.found())
+config_host_data.set('CONFIG_BSD', targetos in bsd_oses)
config_host_data.set('CONFIG_COCOA', cocoa.found())
+config_host_data.set('CONFIG_DARWIN', targetos == 'darwin')
config_host_data.set('CONFIG_FUZZ', get_option('fuzzing'))
config_host_data.set('CONFIG_GCOV', get_option('b_coverage'))
config_host_data.set('CONFIG_LIBUDEV', libudev.found())
+config_host_data.set('CONFIG_LINUX', targetos == 'linux')
+config_host_data.set('CONFIG_POSIX', targetos != 'windows')
+config_host_data.set('CONFIG_WIN32', targetos == 'windows')
config_host_data.set('CONFIG_LZO', lzo.found())
config_host_data.set('CONFIG_MPATH', mpathpersist.found())
-config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api)
config_host_data.set('CONFIG_BLKIO', blkio.found())
if blkio.found()
config_host_data.set('CONFIG_BLKIO_VHOST_VDPA_FD',
dependencies: numa))
endif
config_host_data.set('CONFIG_OPENGL', opengl.found())
-config_host_data.set('CONFIG_PROFILER', get_option('profiler'))
+config_host_data.set('CONFIG_PLUGIN', get_option('plugins'))
config_host_data.set('CONFIG_RBD', rbd.found())
config_host_data.set('CONFIG_RDMA', rdma.found())
config_host_data.set('CONFIG_SAFESTACK', get_option('safe_stack'))
config_host_data.set('CONFIG_SECCOMP_SYSRAWRC', seccomp_has_sysrawrc)
endif
config_host_data.set('CONFIG_SNAPPY', snappy.found())
+config_host_data.set('CONFIG_SOLARIS', targetos == 'sunos')
+if get_option('tcg').allowed()
+ config_host_data.set('CONFIG_TCG', 1)
+ config_host_data.set('CONFIG_TCG_INTERPRETER', tcg_arch == 'tci')
+endif
config_host_data.set('CONFIG_TPM', have_tpm)
config_host_data.set('CONFIG_TSAN', get_option('tsan'))
config_host_data.set('CONFIG_USB_LIBUSB', libusb.found())
config_host_data.set('CONFIG_DEBUG_GRAPH_LOCK', get_option('debug_graph_lock'))
config_host_data.set('CONFIG_DEBUG_MUTEX', get_option('debug_mutex'))
config_host_data.set('CONFIG_DEBUG_STACK_USAGE', get_option('debug_stack_usage'))
+config_host_data.set('CONFIG_DEBUG_TCG', get_option('debug_tcg'))
config_host_data.set('CONFIG_GPROF', get_option('gprof'))
config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION', get_option('live_block_migration').allowed())
config_host_data.set('CONFIG_QOM_CAST_DEBUG', get_option('qom_cast_debug'))
config_host_data.set('CONFIG_DUP3', cc.has_function('dup3'))
config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate'))
config_host_data.set('CONFIG_POSIX_FALLOCATE', cc.has_function('posix_fallocate'))
+config_host_data.set('CONFIG_GETCPU', cc.has_function('getcpu', prefix: gnu_source_prefix))
+config_host_data.set('CONFIG_SCHED_GETCPU', cc.has_function('sched_getcpu', prefix: '#include <sched.h>'))
# Note that we need to specify prefix: here to avoid incorrectly
# thinking that Windows has posix_memalign()
config_host_data.set('CONFIG_POSIX_MEMALIGN', cc.has_function('posix_memalign', prefix: '#include <stdlib.h>'))
int main(int argc, char *argv[]) { return bar(argv[0]); }
'''), error_message: 'AVX512BW not available').allowed())
+# For both AArch64 and AArch32, detect if builtins are available.
+config_host_data.set('CONFIG_ARM_AES_BUILTIN', cc.compiles('''
+ #include <arm_neon.h>
+ #ifndef __ARM_FEATURE_AES
+ __attribute__((target("+crypto")))
+ #endif
+ void foo(uint8x16_t *p) { *p = vaesmcq_u8(*p); }
+ '''))
+
have_pvrdma = get_option('pvrdma') \
.require(rdma.found(), error_message: 'PVRDMA requires OpenFabrics libraries') \
.require(cc.compiles(gnu_source_prefix + '''
have_vss = false
have_vss_sdk = false # old xp/2003 SDK
-if targetos == 'windows' and link_language == 'cpp'
+if targetos == 'windows' and 'cpp' in all_languages
have_vss = cxx.compiles('''
#define __MIDL_user_allocate_free_DEFINED__
#include <vss.h>
endif
config_host_data.set('HAVE_VSS_SDK', have_vss_sdk)
-foreach k, v: config_host
- if k.startswith('CONFIG_')
- config_host_data.set(k, v == 'y' ? 1 : v)
- endif
-endforeach
-
# Older versions of MinGW do not import _lock_file and _unlock_file properly.
# This was fixed for v6.0.0 with commit b48e3ac8969d.
if targetos == 'windows'
########################
minikconf = find_program('scripts/minikconf.py')
+config_targetos = {
+ (targetos == 'windows' ? 'CONFIG_WIN32' : 'CONFIG_POSIX'): 'y'
+}
+if targetos == 'darwin'
+ config_targetos += {'CONFIG_DARWIN': 'y'}
+elif targetos == 'linux'
+ config_targetos += {'CONFIG_LINUX': 'y'}
+endif
+if targetos in bsd_oses
+ config_targetos += {'CONFIG_BSD': 'y'}
+endif
+
config_all = {}
config_all_devices = {}
config_all_disas = {}
(have_vhost_vdpa ? ['CONFIG_VHOST_VDPA=y'] : []) + \
(have_vhost_kernel ? ['CONFIG_VHOST_KERNEL=y'] : []) + \
(have_virtfs ? ['CONFIG_VIRTFS=y'] : []) + \
- ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
+ (targetos == 'linux' ? ['CONFIG_LINUX=y'] : []) + \
(have_pvrdma ? ['CONFIG_PVRDMA=y'] : []) + \
(multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=y'] : []) + \
(vfio_user_server_allowed ? ['CONFIG_VFIO_USER_SERVER_ALLOWED=y'] : [])
endif
config_target += { 'CONFIG_LINUX_USER': 'y' }
elif target.endswith('bsd-user')
- if 'CONFIG_BSD' not in config_host
+ if targetos not in bsd_oses
if default_targets
continue
endif
endif
config_target += { 'CONFIG_BSD_USER': 'y' }
elif target.endswith('softmmu')
+ config_target += { 'CONFIG_SYSTEM_ONLY': 'y' }
config_target += { 'CONFIG_SOFTMMU': 'y' }
endif
if target.endswith('-user')
# pseudo symbol replaces it.
config_all += config_all_devices
-config_all += config_host
+config_all += config_targetos
config_all += config_all_disas
config_all += {
'CONFIG_XEN': xen.found(),
- 'CONFIG_SOFTMMU': have_system,
+ 'CONFIG_SYSTEM_ONLY': have_system,
'CONFIG_USER_ONLY': have_user,
'CONFIG_ALL': true,
}
libvfio_user_dep = not_found
if have_system and vfio_user_server_allowed
- have_internal = fs.exists(meson.current_source_dir() / 'subprojects/libvfio-user/meson.build')
-
- if not have_internal
- error('libvfio-user source not found - please pull git submodule')
- endif
-
- libvfio_user_proj = subproject('libvfio-user')
-
+ libvfio_user_proj = subproject('libvfio-user', required: true)
libvfio_user_dep = libvfio_user_proj.get_variable('libvfio_user_dep')
endif
endif
if not fdt.found()
assert(fdt_opt == 'internal')
- have_internal = fs.exists(meson.current_source_dir() / 'subprojects/dtc/meson.build')
-
- if not have_internal
- error('libfdt source not found - please pull git submodule')
- endif
-
libfdt_proj = subproject('dtc', required: true,
default_options: ['tools=false', 'yaml=disabled',
'python=disabled', 'default_library=static'])
io_ss = ss.source_set()
qmp_ss = ss.source_set()
qom_ss = ss.source_set()
-softmmu_ss = ss.source_set()
+system_ss = ss.source_set()
specific_fuzz_ss = ss.source_set()
specific_ss = ss.source_set()
stub_ss = ss.source_set()
'hw/ssi',
'hw/timer',
'hw/tpm',
+ 'hw/ufs',
'hw/usb',
'hw/vfio',
'hw/virtio',
modulecommon = declare_dependency(link_whole: libmodulecommon, compile_args: '-DBUILD_DSO')
endif
-qom_ss = qom_ss.apply(config_host, strict: false)
+qom_ss = qom_ss.apply(config_targetos, strict: false)
libqom = static_library('qom', qom_ss.sources() + genh,
dependencies: [qom_ss.dependencies()],
name_suffix: 'fa')
# os-posix.c contains POSIX-specific functions used by qemu-storage-daemon,
# os-win32.c does not
blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c'))
- softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')])
+ system_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')])
endif
common_ss.add(files('cpus-common.c'))
if d == 'block'
block_ss.add_all(module_ss)
else
- softmmu_ss.add_all(module_ss)
+ system_ss.add_all(module_ss)
endif
endif
endforeach
foreach target : target_dirs
if target.endswith('-softmmu')
config_target = config_target_mak[target]
- config_target += config_host
+ config_target += config_targetos
target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])]
c_args = ['-DNEED_CPU_H',
'-DCONFIG_TARGET="@0@-config-target.h"'.format(target),
capture: true,
command: [undefsym, nm, '@INPUT@'])
-authz_ss = authz_ss.apply(config_host, strict: false)
+authz_ss = authz_ss.apply(config_targetos, strict: false)
libauthz = static_library('authz', authz_ss.sources() + genh,
dependencies: [authz_ss.dependencies()],
name_suffix: 'fa',
authz = declare_dependency(link_whole: libauthz,
dependencies: qom)
-crypto_ss = crypto_ss.apply(config_host, strict: false)
+crypto_ss = crypto_ss.apply(config_targetos, strict: false)
libcrypto = static_library('crypto', crypto_ss.sources() + genh,
dependencies: [crypto_ss.dependencies()],
name_suffix: 'fa',
crypto = declare_dependency(link_whole: libcrypto,
dependencies: [authz, qom])
-io_ss = io_ss.apply(config_host, strict: false)
+io_ss = io_ss.apply(config_targetos, strict: false)
libio = static_library('io', io_ss.sources() + genh,
dependencies: [io_ss.dependencies()],
link_with: libqemuutil,
build_by_default: false)
migration = declare_dependency(link_with: libmigration,
dependencies: [zlib, qom, io])
-softmmu_ss.add(migration)
+system_ss.add(migration)
-block_ss = block_ss.apply(config_host, strict: false)
+block_ss = block_ss.apply(config_targetos, strict: false)
libblock = static_library('block', block_ss.sources() + genh,
dependencies: block_ss.dependencies(),
link_depends: block_syms,
link_args: '@block.syms',
dependencies: [crypto, io])
-blockdev_ss = blockdev_ss.apply(config_host, strict: false)
+blockdev_ss = blockdev_ss.apply(config_targetos, strict: false)
libblockdev = static_library('blockdev', blockdev_ss.sources() + genh,
dependencies: blockdev_ss.dependencies(),
name_suffix: 'fa',
blockdev = declare_dependency(link_whole: [libblockdev],
dependencies: [block, event_loop_base])
-qmp_ss = qmp_ss.apply(config_host, strict: false)
+qmp_ss = qmp_ss.apply(config_targetos, strict: false)
libqmp = static_library('qmp', qmp_ss.sources() + genh,
dependencies: qmp_ss.dependencies(),
name_suffix: 'fa',
chardev = declare_dependency(link_whole: libchardev)
-hwcore_ss = hwcore_ss.apply(config_host, strict: false)
+hwcore_ss = hwcore_ss.apply(config_targetos, strict: false)
libhwcore = static_library('hwcore', sources: hwcore_ss.sources() + genh,
name_suffix: 'fa',
build_by_default: false)
alias_target('modules', emulator_modules)
endif
-softmmu_ss.add(authz, blockdev, chardev, crypto, io, qmp)
+system_ss.add(authz, blockdev, chardev, crypto, io, qmp)
common_ss.add(qom, qemuutil)
-common_ss.add_all(when: 'CONFIG_SOFTMMU', if_true: [softmmu_ss])
+common_ss.add_all(when: 'CONFIG_SYSTEM_ONLY', if_true: [system_ss])
common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss)
common_all = common_ss.apply(config_all, strict: false)
'-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)]
link_args = emulator_link_args
- config_target += config_host
+ config_target += config_targetos
target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])]
if targetos == 'linux'
target_inc += include_directories('linux-headers', is_system: true)
c_args: c_args,
dependencies: arch_deps + deps + exe['dependencies'],
objects: lib.extract_all_objects(recursive: true),
- link_language: link_language,
link_depends: [block_syms, qemu_syms] + exe.get('link_depends', []),
link_args: link_args,
win_subsystem: exe['win_subsystem'])
# Other build targets
-if 'CONFIG_PLUGIN' in config_host
+if get_option('plugins')
install_headers('include/qemu/qemu-plugin.h')
endif
# Configuration summary #
#########################
-# Directories
+# Build environment
summary_info = {}
+summary_info += {'Build directory': meson.current_build_dir()}
+summary_info += {'Source path': meson.current_source_dir()}
+summary_info += {'Download dependencies': get_option('wrap_mode') != 'nodownload'}
+summary(summary_info, bool_yn: true, section: 'Build environment')
+
+# Directories
summary_info += {'Install prefix': get_option('prefix')}
summary_info += {'BIOS directory': qemu_datadir}
pathsep = targetos == 'windows' ? ';' : ':'
summary_info += {'local state directory': 'queried at runtime'}
endif
summary_info += {'Doc directory': get_option('prefix') / get_option('docdir')}
-summary_info += {'Build directory': meson.current_build_dir()}
-summary_info += {'Source path': meson.current_source_dir()}
-summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']}
summary(summary_info, bool_yn: true, section: 'Directories')
# Host binaries
summary_info = {}
-summary_info += {'git': config_host['GIT']}
summary_info += {'python': '@0@ (version: @1@)'.format(python.full_path(), python.language_version())}
summary_info += {'sphinx-build': sphinx_build}
if config_host.has_key('HAVE_GDB_BIN')
summary_info += {'host endianness': build_machine.endian()}
summary_info += {'C compiler': ' '.join(meson.get_compiler('c').cmd_array())}
summary_info += {'Host C compiler': ' '.join(meson.get_compiler('c', native: true).cmd_array())}
-if link_language == 'cpp'
+if 'cpp' in all_languages
summary_info += {'C++ compiler': ' '.join(meson.get_compiler('cpp').cmd_array())}
else
summary_info += {'C++ compiler': false}
option_cflags += ['-O' + get_option('optimization')]
endif
summary_info += {'CFLAGS': ' '.join(get_option('c_args') + option_cflags)}
-if link_language == 'cpp'
+if 'cpp' in all_languages
summary_info += {'CXXFLAGS': ' '.join(get_option('cpp_args') + option_cflags)}
endif
if targetos == 'darwin'
summary_info += {'OBJCFLAGS': ' '.join(get_option('objc_args') + option_cflags)}
endif
-link_args = get_option(link_language + '_link_args')
+link_args = get_option('c_link_args')
if link_args.length() > 0
summary_info += {'LDFLAGS': ' '.join(link_args)}
endif
summary_info += {'QEMU_OBJCFLAGS': ' '.join(qemu_common_flags)}
endif
summary_info += {'QEMU_LDFLAGS': ' '.join(qemu_ldflags)}
-summary_info += {'profiler': get_option('profiler')}
summary_info += {'link-time optimization (LTO)': get_option('b_lto')}
summary_info += {'PIE': get_option('b_pie')}
-summary_info += {'static build': config_host.has_key('CONFIG_STATIC')}
+summary_info += {'static build': get_option('prefer_static')}
summary_info += {'malloc trim support': has_malloc_trim}
summary_info += {'membarrier': have_membarrier}
summary_info += {'debug graph lock': get_option('debug_graph_lock')}
summary_info = {}
if have_system
summary_info += {'KVM support': config_all.has_key('CONFIG_KVM')}
- summary_info += {'HAX support': config_all.has_key('CONFIG_HAX')}
summary_info += {'HVF support': config_all.has_key('CONFIG_HVF')}
summary_info += {'WHPX support': config_all.has_key('CONFIG_WHPX')}
summary_info += {'NVMM support': config_all.has_key('CONFIG_NVMM')}
else
summary_info += {'TCG backend': 'native (@0@)'.format(cpu)}
endif
- summary_info += {'TCG plugins': config_host.has_key('CONFIG_PLUGIN')}
- summary_info += {'TCG debug enabled': config_host.has_key('CONFIG_DEBUG_TCG')}
+ summary_info += {'TCG plugins': get_option('plugins')}
+ summary_info += {'TCG debug enabled': get_option('debug_tcg')}
endif
summary_info += {'target list': ' '.join(target_dirs)}
if have_system
summary_info += {'Block whitelist (ro)': get_option('block_drv_ro_whitelist')}
summary_info += {'Use block whitelist in tools': get_option('block_drv_whitelist_in_tools')}
summary_info += {'VirtFS (9P) support': have_virtfs}
- summary_info += {'VirtFS (9P) Proxy Helper support': have_virtfs_proxy_helper}
+ summary_info += {'VirtFS (9P) Proxy Helper support (deprecated)': have_virtfs_proxy_helper}
summary_info += {'Live block migration': config_host_data.get('CONFIG_LIVE_BLOCK_MIGRATION')}
summary_info += {'replication support': config_host_data.get('CONFIG_REPLICATION')}
summary_info += {'bochs support': get_option('bochs').allowed()}
summary_info += {'Linux keyring': have_keyring}
summary(summary_info, bool_yn: true, section: 'Crypto')
-# Libraries
+# UI
summary_info = {}
if targetos == 'darwin'
summary_info += {'Cocoa support': cocoa}
- summary_info += {'vmnet.framework support': vmnet}
endif
summary_info += {'SDL support': sdl}
summary_info += {'SDL image support': sdl_image}
summary_info += {'GTK support': gtk}
summary_info += {'pixman': pixman}
summary_info += {'VTE support': vte}
-summary_info += {'slirp support': slirp}
-summary_info += {'libtasn1': tasn1}
-summary_info += {'PAM': pam}
-summary_info += {'iconv support': iconv}
-summary_info += {'curses support': curses}
-summary_info += {'virgl support': virgl}
-summary_info += {'blkio support': blkio}
-summary_info += {'curl support': curl}
-summary_info += {'Multipath support': mpathpersist}
summary_info += {'PNG support': png}
summary_info += {'VNC support': vnc}
if vnc.found()
summary_info += {'VNC SASL support': sasl}
summary_info += {'VNC JPEG support': jpeg}
endif
+summary_info += {'spice protocol support': spice_protocol}
+if spice_protocol.found()
+ summary_info += {' spice server support': spice}
+endif
+summary_info += {'curses support': curses}
+summary_info += {'brlapi support': brlapi}
+summary(summary_info, bool_yn: true, section: 'User interface')
+
+# Audio backends
+summary_info = {}
if targetos not in ['darwin', 'haiku', 'windows']
summary_info += {'OSS support': oss}
summary_info += {'sndio support': sndio}
summary_info += {'ALSA support': alsa}
summary_info += {'PulseAudio support': pulse}
endif
-summary_info += {'Pipewire support': pipewire}
+summary_info += {'PipeWire support': pipewire}
summary_info += {'JACK support': jack}
-summary_info += {'brlapi support': brlapi}
+summary(summary_info, bool_yn: true, section: 'Audio backends')
+
+# Network backends
+summary_info = {}
+if targetos == 'darwin'
+ summary_info += {'vmnet.framework support': vmnet}
+endif
+summary_info += {'slirp support': slirp}
summary_info += {'vde support': vde}
summary_info += {'netmap support': have_netmap}
summary_info += {'l2tpv3 support': have_l2tpv3}
+summary(summary_info, bool_yn: true, section: 'Network backends')
+
+# Libraries
+summary_info = {}
+summary_info += {'libtasn1': tasn1}
+summary_info += {'PAM': pam}
+summary_info += {'iconv support': iconv}
+summary_info += {'virgl support': virgl}
+summary_info += {'blkio support': blkio}
+summary_info += {'curl support': curl}
+summary_info += {'Multipath support': mpathpersist}
summary_info += {'Linux AIO support': libaio}
summary_info += {'Linux io_uring support': linux_io_uring}
summary_info += {'ATTR/XATTR support': libattr}
summary_info += {'fdt support': fdt_opt == 'disabled' ? false : fdt_opt}
summary_info += {'libcap-ng support': libcap_ng}
summary_info += {'bpf support': libbpf}
-summary_info += {'spice protocol support': spice_protocol}
-if spice_protocol.found()
- summary_info += {' spice server support': spice}
-endif
summary_info += {'rbd support': rbd}
summary_info += {'smartcard support': cacard}
summary_info += {'U2F support': u2f}
summary_info += {'libdw': libdw}
summary(summary_info, bool_yn: true, section: 'Dependencies')
-if not supported_cpus.contains(cpu)
+if host_arch == 'unknown'
message()
- warning('SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!')
+ warning('UNSUPPORTED HOST CPU')
message()
- message('CPU host architecture ' + cpu + ' support is not currently maintained.')
- message('The QEMU project intends to remove support for this host CPU in')
- message('a future release if nobody volunteers to maintain it and to')
- message('provide a build host for our continuous integration setup.')
- message('configure has succeeded and you can continue to build, but')
- message('if you care about QEMU on this platform you should contact')
- message('us upstream at qemu-devel@nongnu.org.')
+ message('Support for CPU host architecture ' + cpu + ' is not currently')
+ message('maintained. The QEMU project does not guarantee that QEMU will')
+ message('compile or work on this host CPU. You can help by volunteering')
+ message('to maintain it and providing a build host for our continuous')
+ message('integration setup.')
+ if get_option('tcg').allowed() and target_dirs.length() > 0
+ message()
+ message('configure has succeeded and you can continue to build, but')
+ message('QEMU will use a slow interpreter to emulate the target CPU.')
+ endif
endif
if not supported_oses.contains(targetos)
message()
- warning('WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASES!')
+ warning('UNSUPPORTED HOST OS')
message()
- message('Host OS ' + targetos + 'support is not currently maintained.')
- message('The QEMU project intends to remove support for this host OS in')
- message('a future release if nobody volunteers to maintain it and to')
- message('provide a build host for our continuous integration setup.')
+ message('Support for host OS ' + targetos + 'is not currently maintained.')
message('configure has succeeded and you can continue to build, but')
- message('if you care about QEMU on this platform you should contact')
- message('us upstream at qemu-devel@nongnu.org.')
+ message('the QEMU project does not guarantee that QEMU will compile or')
+ message('work on this operating system. You can help by volunteering')
+ message('to maintain it and providing a build host for our continuous')
+ message('integration setup. This will ensure that future versions of QEMU')
+ message('will keep working on ' + targetos + '.')
+endif
+
+if host_arch == 'unknown' or not supported_oses.contains(targetos)
+ message()
+ message('If you want to help supporting QEMU on this platform, please')
+ message('contact the developers at qemu-devel@nongnu.org.')
endif