Lines Matching +full:- +full:set
15 meson.add_postconf_script(find_program('scripts/symlink-install-tree.py'))
28 config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
35 tmpdir = meson.current_build_dir() / 'meson-private/temp'
66 have_linux_user = have_linux_user or target.endswith('linux-user')
67 have_bsd_user = have_bsd_user or target.endswith('bsd-user')
68 have_system = have_system or target.endswith('-softmmu')
113 …dgen.version() + ' is unsupported. You can install a new version with "cargo install bindgen-cli"')
120 message('To use Rust you can install a new version with "cargo install bindgen-cli"')
128 '--rustc-version', rustc.version(),
129 '--workspace', meson.project_source_root() / 'rust']
131 rustc_args += ['--strict-lints']
136 rustc_lint_args = run_command(rustc_args, '--lints',
141 # is safe; https://github.com/rust-lang/rust/pull/54675 says that
142 # passing -nodefaultlibs to the linker "was more ideological to
145 ['--cfg', 'MESON', '-C', 'default-linker-libraries'],
147 add_project_arguments(rustc_lint_args + ['--cfg', 'MESON'],
159 # instead. QEMU --enable-modules depends on this because the SystemTap
162 add_global_arguments('-DSTAP_SDT_V2',
173 edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu', 'riscv64-softm…
195 args: ['-Werror', '-fsanitize=fuzzer'])
196 error('Your compiler does not support -fsanitize=fuzzer')
213 # Miscellaneous Linux-only features
222 .require(host_os == 'linux', error_message: 'vfio-user server is supported only on Linux') \
233 error_message: 'vhost-user is not available on Windows').allowed()
236 error_message: 'vhost-vdpa is only available on Linux').allowed()
239 error_message: 'vhost-kernel is only available on Linux').allowed()
242 error_message: 'vhost-crypto requires vhost-user to be enabled').allowed()
287 kvm_targets = ['i386-softmmu']
289 kvm_targets = ['i386-softmmu', 'x86_64-softmmu']
291 kvm_targets = ['aarch64-softmmu']
293 kvm_targets = ['s390x-softmmu']
295 kvm_targets = ['ppc-softmmu']
297 kvm_targets = ['ppc-softmmu', 'ppc64-softmmu']
299 kvm_targets = ['mips-softmmu', 'mipsel-softmmu']
301 kvm_targets = ['mips-softmmu', 'mipsel-softmmu', 'mips64-softmmu', 'mips64el-softmmu']
303 kvm_targets = ['riscv32-softmmu']
305 kvm_targets = ['riscv64-softmmu']
307 kvm_targets = ['loongarch64-softmmu']
314 xen_targets = ['i386-softmmu']
316 xen_targets = ['i386-softmmu', 'x86_64-softmmu']
319 xen_targets = ['i386-softmmu']
322 xen_targets = ['i386-softmmu', 'x86_64-softmmu', 'aarch64-softmmu']
330 'CONFIG_HVF': ['aarch64-softmmu']
334 'CONFIG_HVF': ['x86_64-softmmu'],
335 'CONFIG_NVMM': ['i386-softmmu', 'x86_64-softmmu'],
336 'CONFIG_WHPX': ['i386-softmmu', 'x86_64-softmmu'],
367 # We use -fwrapv to tell the compiler that we require a C dialect where
369 # 2s-complement style results. (Both clang and gcc agree that it
373 '-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE',
374 '-fno-strict-aliasing', '-fno-common', '-fwrapv' ]
382 qemu_common_flags += '-DOS_OBJECT_USE_OBJC=0'
386 qemu_common_flags += '-D_XOPEN_SOURCE=600'
388 qemu_common_flags += '-D__EXTENSIONS__'
390 qemu_common_flags += ['-DB_USE_POSITIVE_POSIX_ERRORS', '-D_BSD_SOURCE', '-fPIC']
394 error('On windows, you need to use lld with clang - use msys2 clang64/clangarm64 env')
398 # Choose instruction set (currently x86-only)
402 # __sync_fetch_and_and requires at least -march=i486. Many toolchains
418 qemu_isa_flags += ['-march=i486']
421 # Pick x86-64 baseline version
424 error('x86_64-v1 required for x86-64 hosts')
427 # add flags for individual instruction set extensions
430 qemu_common_flags = ['-mfpmath=sse'] + qemu_common_flags
433 # x86-64-v1, so only include -mneeded for x86-64 version 2 and above
434 qemu_isa_flags += ['-mcx16']
438 qemu_isa_flags += ['-mpopcnt']
439 qemu_isa_flags += cc.get_supported_arguments('-mneeded')
442 qemu_isa_flags += ['-mmovbe', '-mabm', '-mbmi', '-mbmi2', '-mfma', '-mf16c']
445 # add required vector instruction set (each level implies those below)
447 qemu_isa_flags += ['-msse2']
449 qemu_isa_flags += ['-msse4.2']
451 qemu_isa_flags += ['-mavx2']
453 qemu_isa_flags += ['-mavx512f', '-mavx512bw', '-mavx512cd', '-mavx512dq', '-mavx512vl']
460 qemu_ldflags += get_option('b_pie') ? '-static-pie' : '-static'
466 # -no-pie is supposedly a linker flag that has no effect on the compiler
469 # a compiler command-line flag.
471 # What about linker flags? For a static build, no PIE is implied by -static
474 # distro and do not use --disable-pie in the meanwhile). For dynamic linking,
475 # instead, we can't add -no-pie because it overrides -shared: the linker then
477 # don't add -no-pie anywhere and cross fingers. :(
479 # Emscripten doesn't support -no-pie but meson can't catch the compiler
482 qemu_common_flags += cc.get_supported_arguments('-fno-pie', '-no-pie')
489 char arr[64], *p = arr, *c = argv[argc - 1];
496 foreach arg : ['-fstack-protector-strong', '-fstack-protector-all']
498 # setups fail only on a .c->.o compile and some only at link time
499 if cc.compiles(stack_protector_probe, args: ['-Werror', arg]) and \
500 cc.links(stack_protector_probe, args: ['-Werror', arg])
553 safe_stack_arg = get_option('safe_stack') ? '-fsanitize=safe-stack' : '-fno-sanitize=safe-stack'
567 if cc.has_argument('-fsanitize=address')
568 qemu_cflags = ['-fsanitize=address'] + qemu_cflags
569 qemu_ldflags = ['-fsanitize=address'] + qemu_ldflags
571 error('Your compiler does not support -fsanitize=address')
579 args: [qemu_ldflags, '-fsanitize=undefined'])
580 qemu_cflags += ['-fsanitize=undefined']
581 qemu_ldflags += ['-fsanitize=undefined']
586 if cc.has_argument('-fno-sanitize=function')
587 qemu_cflags += ['-fno-sanitize=function']
590 error('Your compiler does not support -fsanitize=undefined')
601 args: '-fsanitize=thread',
607 # "error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’"
608 # https://gcc.gnu.org/gcc-11/changes.html
610 if cc.has_argument('-Wno-tsan')
611 tsan_warn_suppress = ['-Wno-tsan']
613 qemu_cflags = ['-fsanitize=thread'] + tsan_warn_suppress + qemu_cflags
614 qemu_ldflags = ['-fsanitize=thread'] + qemu_ldflags
618 # The combination is known as "full relro", because .got.plt is read-only too.
619 qemu_ldflags += cc.get_supported_link_arguments('-Wl,-z,relro', '-Wl,-z,now')
622 qemu_ldflags += cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,--nxcompat')
623 qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicbase', '-Wl,--high-entropy-va')
628 # virtual-devices.
629 configure_file(output: 'instrumentation-filter',
630 input: 'scripts/oss-fuzz/instrumentation-filter-template',
634 name: '-fsanitize-coverage-allowlist=/dev/null',
635 args: ['-fsanitize-coverage-allowlist=/dev/null',
636 '-fsanitize-coverage=trace-pc'] )
637 qemu_common_flags += ['-fsanitize-coverage-allowlist=instrumentation-filter']
641 # Add CFLAGS to tell clang to add fuzzer-related instrumentation to all the
642 # compiled code. To build non-fuzzer binaries with --enable-fuzzing, link
643 # everything with fsanitize=fuzzer-no-link. Otherwise, the linker will be
644 # unable to bind the fuzzer-related callbacks added by instrumentation.
645 qemu_common_flags += ['-fsanitize=fuzzer-no-link']
646 qemu_ldflags += ['-fsanitize=fuzzer-no-link']
648 # library. They need to be configurable, to support OSS-Fuzz
649 fuzz_exe_ldflags = ['-fsanitize=fuzzer']
651 # LIB_FUZZING_ENGINE was set; assume we are running on OSS-Fuzz, and
661 error('Selected Control-Flow Integrity but LTO is disabled')
664 error('Selected Control-Flow Integrity is not compatible with modules')
669 if cc.compiles('int main () { return 0; }', name: '-fsanitize=cfi-icall',
670 args: ['-flto', '-fsanitize=cfi-icall'] )
671 cfi_flags += '-fsanitize=cfi-icall'
673 error('-fsanitize=cfi-icall is not supported by the compiler')
676 name: '-fsanitize-cfi-icall-generalize-pointers',
677 args: ['-flto', '-fsanitize=cfi-icall',
678 '-fsanitize-cfi-icall-generalize-pointers'] )
679 cfi_flags += '-fsanitize-cfi-icall-generalize-pointers'
681 error('-fsanitize-cfi-icall-generalize-pointers is not supported by the compiler')
685 name: '-fno-sanitize-trap=cfi-icall',
686 args: ['-flto', '-fsanitize=cfi-icall',
687 '-fno-sanitize-trap=cfi-icall'] )
688 cfi_flags += '-fno-sanitize-trap=cfi-icall'
690 error('-fno-sanitize-trap=cfi-icall is not supported by the compiler')
703 '-ftrivial-auto-var-init=zero',
711 # https://github.com/llvm/llvm-project/issues/75168
714 # https://gitlab.com/qemu-project/qemu/-/issues/2278
717 name: '-fzero-call-used-regs=used-gpr',
718 args: ['-O2', '-fzero-call-used-regs=used-gpr'])
719 hardening_flags += '-fzero-call-used-regs=used-gpr'
727 # Collect warning flags we want to set, sorted alphabetically
730 '-Wempty-body',
731 '-Wendif-labels',
732 '-Wexpansion-to-defined',
733 '-Wformat-security',
734 '-Wformat-y2k',
735 '-Wignored-qualifiers',
736 '-Wimplicit-fallthrough=2',
737 '-Winit-self',
738 '-Wmissing-format-attribute',
739 '-Wmissing-prototypes',
740 '-Wnested-externs',
741 '-Wold-style-declaration',
742 '-Wold-style-definition',
743 '-Wredundant-decls',
744 '-Wshadow=local',
745 '-Wstrict-prototypes',
746 '-Wtype-limits',
747 '-Wundef',
748 '-Wvla',
749 '-Wwrite-strings',
752 '-Wno-gnu-variable-sized-type-not-at-end',
753 '-Wno-initializer-overrides',
754 '-Wno-missing-include-dirs',
755 '-Wno-psabi',
756 '-Wno-shift-negative-value',
757 '-Wno-string-plus-int',
758 '-Wno-tautological-type-limit-compare',
759 '-Wno-typedef-redefinition',
772 ''', args: ['-Wthread-safety', '-Werror'])
774 warn_flags += ['-Wthread-safety']
778 # Set up C++ compiler flags
781 …qemu_cxxflags = ['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS'] + …
791 # Note sanitizer flags are not applied to Objective-C sources!
795 add_project_arguments('-isystem', meson.current_source_dir() / 'linux-headers',
796 '-isystem', 'linux-headers',
800 add_project_arguments('-iquote', '.',
801 '-iquote', meson.current_source_dir(),
802 '-iquote', meson.current_source_dir() / 'include',
805 # If a host-specific include directory exists, list that first...
808 add_project_arguments('-iquote', host_include / host_arch,
812 add_project_arguments('-iquote', host_include / 'generic',
819 'compile_commands.json', sparse.full_path(), '-Wbitwise',
820 '-Wno-transparent-union', '-Wno-old-initializer',
821 '-Wno-non-pointer-null'])
825 # Host-specific libraries and flags #
858 depend_files: files('pc-bios/qemu-nsis.ico'),
878 emulator_link_args = cc.get_supported_link_arguments('-Wl,-z,wxneeded')
883 # Host-specific configuration of accelerators #
892 error('WHPX requires 64-bit host')
920 error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu))
924 error('WebAssembly host requires --enable-tcg-interpreter')
930 warning('It is strongly recommended to remove the --enable-tcg-interpreter')
941 add_project_arguments('-iquote', meson.current_source_dir() / 'tcg' / tcg_arch,
963 method: 'pkg-config')
970 method: 'pkg-config',
973 method: 'pkg-config',
976 method: 'pkg-config',
979 method: 'pkg-config',
982 method: 'pkg-config',
986 method: 'pkg-config')])
1011 # Use -D to pick just one of the test programs in scripts/xen-detect.c
1014 ('0' + xen_version[1]).substring(-2) + \
1015 ('0' + xen_version[2]).substring(-2)
1016 if cc.links(files('scripts/xen-detect.c'),
1017 args: '-DCONFIG_XEN_CTRL_INTERFACE_VERSION=' + xen_ctrl_version,
1048 glib_pc = dependency('glib-2.0', version: glib_req_ver, required: true,
1049 method: 'pkg-config')
1052 gmodule = dependency('gmodule-export-2.0', version: glib_req_ver, required: true,
1053 method: 'pkg-config')
1055 gmodule = dependency('gmodule-no-export-2.0', version: glib_req_ver, required: true,
1056 method: 'pkg-config')
1061 # This workaround is required due to a bug in pkg-config file for glib as it
1062 # doesn't define GLIB_STATIC_COMPILATION for pkg-config --static
1064 glib_cflags += ['-DGLIB_STATIC_COMPILATION']
1069 # problems on multi-arch where people try to build
1070 # 32-bit QEMU while pointing at 64-bit glib headers
1077 typedef char qemu_build_bug_on[(x)?-1:1] __attribute__((unused));
1084 You probably need to set PKG_CONFIG_LIBDIR" to point
1085 to the right pkg-config files for your build target.''')
1101 meson.override_dependency('glib-2.0', glib)
1109 gdbus_codegen_error = '@0@ requires gdbus-codegen, please install libgio'
1111 gio = dependency('gio-2.0', required: get_option('gio'),
1112 method: 'pkg-config')
1126 gdbus_codegen = find_program('gdbus-codegen',
1128 gio_unix = dependency('gio-unix-2.0', required: get_option('gio'),
1129 method: 'pkg-config')
1136 gdbus_codegen_error = '@0@ uses gdbus-codegen, which does not support control flow integrity'
1139 xml_pp = find_program('scripts/xml-preprocess.py')
1143 lttng = dependency('lttng-ust', required: true, version: '>= 2.1',
1144 method: 'pkg-config')
1148 pixman = dependency('pixman-1', required: get_option('pixman'), version:'>=0.21.8',
1149 method: 'pkg-config')
1170 method: 'pkg-config')
1180 method: 'pkg-config')
1202 cc.links(libattr_test, dependencies: libattr, args: '-DCONFIG_LIBATTR')
1236 method: 'pkg-config')
1246 libcap_ng = cc.find_library('cap-ng', has_headers: ['cap-ng.h'],
1250 #include <cap-ng.h>
1258 error('could not link libcap-ng')
1260 warning('could not link libcap-ng, disabling')
1268 method: 'pkg-config')
1274 method: 'pkg-config')
1277 # When using a system-wide shared libslirp, the type information for the
1280 # with control-flow integrity.
1283 error('Control-Flow Integrity requires libslirp 4.7.')
1285 warning('Cannot use libslirp since Control-Flow Integrity requires libslirp >= 4.7.')
1316 method: 'pkg-config')
1321 method: 'pkg-config')
1326 method: 'pkg-config')
1330 pipewire = dependency('libpipewire-0.3', version: '>=0.3.60',
1332 method: 'pkg-config')
1337 method: 'pkg-config')
1342 spice_protocol = dependency('spice-protocol', version: '>=0.14.0',
1344 method: 'pkg-config')
1352 spice = dependency('spice-server', version: '>=0.14.0',
1354 method: 'pkg-config')
1364 method: 'pkg-config')
1370 method: 'pkg-config')
1376 method: 'pkg-config')
1382 method: 'pkg-config')
1385 method: 'pkg-config')
1395 method: 'pkg-config')
1403 method: 'pkg-config',
1409 method: 'pkg-config',
1415 method: 'pkg-config',
1421 method: 'pkg-config',
1427 method: 'pkg-config',
1507 method: 'pkg-config')
1509 curses_compile_args = ['-DNCURSES_WIDECHAR=1']
1523 curses_compile_args += ['-I/usr/include/ncursesw']
1544 foreach link_args : [ ['-liconv'], [] ]
1548 # However, without adding glib to the dependencies -L/usr/local/lib will not be
1553 iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
1554 return conv != (iconv_t) -1;
1600 # Some versions of SDL have problems with -Wundef
1605 ''', dependencies: sdl, args: '-Werror=undef')
1606 sdl = declare_dependency(compile_args: '-Wno-undef',
1611 method: 'pkg-config')
1614 error('sdl-image required, but SDL was @0@'.format(
1650 glusterfs = dependency('glusterfs-api', version: '>=3',
1652 method: 'pkg-config')
1700 error('could not enable hv-balloon, update your glib')
1702 warning('could not find glib support for hv-balloon, disabling')
1710 method: 'pkg-config',
1765 dsound = declare_dependency(link_args: ['-lole32', '-ldxguid'])
1783 epoxy = dependency('epoxy', method: 'pkg-config',
1793 gbm = dependency('gbm', method: 'pkg-config', required: false)
1820 method: 'pkg-config',
1827 method: 'pkg-config',
1857 # Debian has removed -lgpg-error from libgcrypt-config
1863 cc.find_library('gpg-error', required: true)],
1891 method: 'pkg-config',
1924 // HMAC-SM3 test
1939 method: 'pkg-config',
1942 # Some versions of capstone have broken pkg-config file
1943 # that reports a wrong -I path, causing the #include to
1955 gmp = dependency('gmp', required: false, method: 'pkg-config')
1958 method: 'pkg-config',
1973 gtk = dependency('gtk+-3.0', version: '>=3.22.0',
1974 method: 'pkg-config',
1977 gtkx11 = dependency('gtk+-x11-3.0', version: '>=3.22.0',
1978 method: 'pkg-config',
1984 vte = dependency('vte-2.91',
1985 method: 'pkg-config',
1995 x11 = dependency('x11', method: 'pkg-config', required: gtkx11.found())
2000 method: 'pkg-config')
2012 method: 'pkg-config')
2017 compile_args: '-DSTRUCT_IOVEC_DEFINED')
2047 snappy = cc.find_library('snappy', has_headers: ['snappy-c.h'],
2051 #include <snappy-c.h>
2138 version: '>=2.5.1', method: 'pkg-config')
2142 u2f = dependency('u2f-emu', required: get_option('u2f'),
2143 method: 'pkg-config')
2147 canokey = dependency('canokey-qemu', required: get_option('canokey'),
2148 method: 'pkg-config')
2152 usbredir = dependency('libusbredirparser-0.5', required: get_option('usb_redir'),
2153 version: '>=0.6', method: 'pkg-config')
2157 libusb = dependency('libusb-1.0', required: get_option('libusb'),
2158 version: '>=1.0.13', method: 'pkg-config')
2164 method: 'pkg-config')
2169 version: '>=57', method: 'pkg-config')
2175 method: 'pkg-config')
2180 method: 'pkg-config')
2188 method: 'pkg-config')
2205 error('malloc_trim not available with non-libc memory allocator')
2220 * function availability on recentish Mingw-w64 platforms. */
2231 error_message: 'vhost_user_blk_server requires vhost-user support') \
2236 error('Cannot enable fuse-lseek while fuse is disabled')
2240 version: '>=3.1', method: 'pkg-config')
2249 error('fuse-lseek requires libfuse >=3.8, found ' + fuse.version())
2251 error('fuse-lseek requires libfuse, which was not found')
2278 …ependency('libbpf', version: '>=' + bpf_version, required: get_option('bpf'), method: 'pkg-config')
2302 version: '>=1.4.0', method: 'pkg-config')
2315 method: 'pkg-config',
2320 # config-host.h #
2325 config_host_data.set('CONFIG_HAVE_RUST', have_rust)
2340 config_host_data.set('CONFIG_AUDIO_' + k.to_upper(), v)
2364 config_host_data.set('CONFIG_AUDIO_DRIVERS',
2372 error_message: '-display dbus requires glib>=2.64') \
2374 error_message: gdbus_codegen_error.format('-display dbus')) \
2379 error_message: 'virtio-9p (virtfs) requires Linux or macOS') \
2381 … error_message: 'virtio-9p (virtfs) on macOS requires the presence of pthread_fchdir_np') \
2383 error_message: 'virtio-9p (virtfs) on Linux requires libattr-devel') \
2401 config_host_data.set('CONFIG_BDRV_RO_WHITELIST', '')
2403 config_host_data.set('CONFIG_BDRV_RO_WHITELIST',
2407 config_host_data.set('CONFIG_BDRV_RW_WHITELIST', '')
2409 config_host_data.set('CONFIG_BDRV_RW_WHITELIST',
2414 config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true)
2431 config_host_data.set('CONFIG_QEMU_FIRMWAREPATH', qemu_firmwarepath)
2441 config_host_data.set('CONFIG_STAMP', run_command(
2442 meson.current_source_dir() / 'scripts/qemu-stamp.py',
2443 meson.project_version(), get_option('pkgversion'), '--',
2459 config_host_data.set('HOST_' + host_arch.to_upper(), 1)
2465 config_host_data.set('CONFIG_KVM_TARGETS', kvm_targets_c)
2468 error('Cannot enable module-upgrades as modules are not enabled')
2470 config_host_data.set('CONFIG_MODULE_UPGRADES', get_option('module_upgrades'))
2472 config_host_data.set('CONFIG_ATTR', libattr.found())
2473 config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_whitelist_in_tools'))
2474 config_host_data.set('CONFIG_BRLAPI', brlapi.found())
2475 config_host_data.set('CONFIG_BSD', host_os in bsd_oses)
2476 config_host_data.set('CONFIG_FREEBSD', host_os == 'freebsd')
2477 config_host_data.set('CONFIG_CAPSTONE', capstone.found())
2478 config_host_data.set('CONFIG_COCOA', cocoa.found())
2479 config_host_data.set('CONFIG_DARWIN', host_os == 'darwin')
2480 config_host_data.set('CONFIG_FDT', fdt.found())
2481 config_host_data.set('CONFIG_FUZZ', get_option('fuzzing'))
2482 config_host_data.set('CONFIG_GCOV', get_option('b_coverage'))
2483 config_host_data.set('CONFIG_LIBUDEV', libudev.found())
2484 config_host_data.set('CONFIG_LINUX', host_os == 'linux')
2485 config_host_data.set('CONFIG_POSIX', host_os != 'windows')
2486 config_host_data.set('CONFIG_WIN32', host_os == 'windows')
2487 config_host_data.set('CONFIG_LZO', lzo.found())
2488 config_host_data.set('CONFIG_MPATH', mpathpersist.found())
2489 config_host_data.set('CONFIG_BLKIO', blkio.found())
2491 config_host_data.set('CONFIG_BLKIO_VHOST_VDPA_FD',
2493 config_host_data.set('CONFIG_BLKIO_WRITE_ZEROS_FUA',
2496 config_host_data.set('CONFIG_CURL', curl.found())
2497 config_host_data.set('CONFIG_CURSES', curses.found())
2498 config_host_data.set('CONFIG_GBM', gbm.found())
2499 config_host_data.set('CONFIG_GIO', gio.found())
2500 config_host_data.set('CONFIG_GLUSTERFS', glusterfs.found())
2502 config_host_data.set('CONFIG_GLUSTERFS_XLATOR_OPT', glusterfs.version().version_compare('>=4'))
2503 config_host_data.set('CONFIG_GLUSTERFS_DISCARD', glusterfs.version().version_compare('>=5'))
2504 config_host_data.set('CONFIG_GLUSTERFS_FALLOCATE', glusterfs.version().version_compare('>=6'))
2505 config_host_data.set('CONFIG_GLUSTERFS_ZEROFILL', glusterfs.version().version_compare('>=6'))
2506 config_host_data.set('CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT', glusterfs_ftruncate_has_stat)
2507 config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_has_stat)
2509 config_host_data.set('CONFIG_GTK', gtk.found())
2510 config_host_data.set('CONFIG_VTE', vte.found())
2511 config_host_data.set('CONFIG_GTK_CLIPBOARD', have_gtk_clipboard)
2512 config_host_data.set('CONFIG_HEXAGON_IDEF_PARSER', get_option('hexagon_idef_parser'))
2513 config_host_data.set('CONFIG_LIBATTR', have_old_libattr)
2514 config_host_data.set('CONFIG_LIBCAP_NG', libcap_ng.found())
2515 config_host_data.set('CONFIG_EBPF', libbpf.found())
2516 config_host_data.set('CONFIG_AF_XDP', libxdp.found())
2517 config_host_data.set('CONFIG_LIBDAXCTL', libdaxctl.found())
2518 config_host_data.set('CONFIG_LIBISCSI', libiscsi.found())
2519 config_host_data.set('CONFIG_LIBNFS', libnfs.found())
2520 config_host_data.set('CONFIG_LIBSSH', libssh.found())
2521 config_host_data.set('CONFIG_LINUX_AIO', libaio.found())
2522 config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found())
2523 config_host_data.set('CONFIG_LIBPMEM', libpmem.found())
2524 config_host_data.set('CONFIG_MODULES', enable_modules)
2525 config_host_data.set('CONFIG_NUMA', numa.found())
2527 config_host_data.set('HAVE_NUMA_HAS_PREFERRED_MANY',
2531 config_host_data.set('CONFIG_OPENGL', opengl.found())
2532 config_host_data.set('CONFIG_PLUGIN', get_option('plugins'))
2533 config_host_data.set('CONFIG_RBD', rbd.found())
2534 config_host_data.set('CONFIG_RDMA', rdma.found())
2535 config_host_data.set('CONFIG_RELOCATABLE', get_option('relocatable'))
2536 config_host_data.set('CONFIG_SAFESTACK', get_option('safe_stack'))
2537 config_host_data.set('CONFIG_SDL', sdl.found())
2538 config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
2539 config_host_data.set('CONFIG_SECCOMP', seccomp.found())
2541 config_host_data.set('CONFIG_SECCOMP_SYSRAWRC', seccomp_has_sysrawrc)
2543 config_host_data.set('CONFIG_PIXMAN', pixman.found())
2544 config_host_data.set('CONFIG_SLIRP', slirp.found())
2545 config_host_data.set('CONFIG_SNAPPY', snappy.found())
2546 config_host_data.set('CONFIG_SOLARIS', host_os == 'sunos')
2548 config_host_data.set('CONFIG_TCG', 1)
2549 config_host_data.set('CONFIG_TCG_INTERPRETER', tcg_arch == 'tci')
2551 config_host_data.set('CONFIG_TPM', have_tpm)
2552 config_host_data.set('CONFIG_TSAN', get_option('tsan'))
2553 config_host_data.set('CONFIG_USB_LIBUSB', libusb.found())
2554 config_host_data.set('CONFIG_VDE', vde.found())
2555 config_host_data.set('CONFIG_VHOST', have_vhost)
2556 config_host_data.set('CONFIG_VHOST_NET', have_vhost_net)
2557 config_host_data.set('CONFIG_VHOST_NET_USER', have_vhost_net_user)
2558 config_host_data.set('CONFIG_VHOST_NET_VDPA', have_vhost_net_vdpa)
2559 config_host_data.set('CONFIG_VHOST_KERNEL', have_vhost_kernel)
2560 config_host_data.set('CONFIG_VHOST_USER', have_vhost_user)
2561 config_host_data.set('CONFIG_VHOST_CRYPTO', have_vhost_user_crypto)
2562 config_host_data.set('CONFIG_VHOST_VDPA', have_vhost_vdpa)
2563 config_host_data.set('CONFIG_VMNET', vmnet.found())
2564 config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server)
2565 config_host_data.set('CONFIG_VDUSE_BLK_EXPORT', have_vduse_blk_export)
2566 config_host_data.set('CONFIG_PNG', png.found())
2567 config_host_data.set('CONFIG_VNC', vnc.found())
2568 config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
2569 config_host_data.set('CONFIG_VNC_SASL', sasl.found())
2571 config_host_data.set('VIRGL_VERSION_MAJOR', virgl.version().split('.')[0])
2573 config_host_data.set('CONFIG_VIRTFS', have_virtfs)
2574 config_host_data.set('CONFIG_VTE', vte.found())
2575 config_host_data.set('CONFIG_XKBCOMMON', xkbcommon.found())
2576 config_host_data.set('CONFIG_KEYUTILS', keyutils.found())
2577 config_host_data.set('CONFIG_GETTID', has_gettid)
2578 config_host_data.set('CONFIG_GNUTLS', gnutls.found())
2579 config_host_data.set('CONFIG_GNUTLS_CRYPTO', gnutls_crypto.found())
2580 config_host_data.set('CONFIG_TASN1', tasn1.found())
2581 config_host_data.set('CONFIG_GCRYPT', gcrypt.found())
2582 config_host_data.set('CONFIG_NETTLE', nettle.found())
2583 config_host_data.set('CONFIG_CRYPTO_SM4', crypto_sm4.found())
2584 config_host_data.set('CONFIG_CRYPTO_SM3', crypto_sm3.found())
2585 config_host_data.set('CONFIG_HOGWEED', hogweed.found())
2586 config_host_data.set('CONFIG_QEMU_PRIVATE_XTS', xts == 'private')
2587 config_host_data.set('CONFIG_MALLOC_TRIM', has_malloc_trim)
2588 config_host_data.set('CONFIG_ZSTD', zstd.found())
2589 config_host_data.set('CONFIG_QPL', qpl.found())
2590 config_host_data.set('CONFIG_UADK', uadk.found())
2591 config_host_data.set('CONFIG_QATZIP', qatzip.found())
2592 config_host_data.set('CONFIG_FUSE', fuse.found())
2593 config_host_data.set('CONFIG_FUSE_LSEEK', fuse_lseek.found())
2594 config_host_data.set('CONFIG_SPICE_PROTOCOL', spice_protocol.found())
2596 config_host_data.set('CONFIG_SPICE_PROTOCOL_MAJOR', spice_protocol.version().split('.')[0])
2597 config_host_data.set('CONFIG_SPICE_PROTOCOL_MINOR', spice_protocol.version().split('.')[1])
2598 config_host_data.set('CONFIG_SPICE_PROTOCOL_MICRO', spice_protocol.version().split('.')[2])
2600 config_host_data.set('CONFIG_SPICE', spice.found())
2601 config_host_data.set('CONFIG_X11', x11.found())
2602 config_host_data.set('CONFIG_DBUS_DISPLAY', dbus_display)
2603 config_host_data.set('CONFIG_CFI', get_option('cfi'))
2604 config_host_data.set('CONFIG_SELINUX', selinux.found())
2605 config_host_data.set('CONFIG_XEN_BACKEND', xen.found())
2606 config_host_data.set('CONFIG_LIBDW', libdw.found())
2611 ('0' + xen_version[1]).substring(-2) + \
2612 ('0' + xen_version[2]).substring(-2)
2613 config_host_data.set('CONFIG_XEN_CTRL_INTERFACE_VERSION', xen_ctrl_version)
2615 config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version()))
2616 config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0])
2617 config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
2618 config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2])
2621 config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device)
2628 config_host_data.set('CONFIG_COROUTINE_POOL', have_coroutine_pool)
2629 config_host_data.set('CONFIG_DEBUG_GRAPH_LOCK', get_option('debug_graph_lock'))
2630 config_host_data.set('CONFIG_DEBUG_MUTEX', get_option('debug_mutex'))
2631 config_host_data.set('CONFIG_DEBUG_STACK_USAGE', get_option('debug_stack_usage'))
2632 config_host_data.set('CONFIG_DEBUG_TCG', get_option('debug_tcg'))
2633 config_host_data.set('CONFIG_DEBUG_REMAP', get_option('debug_remap'))
2634 config_host_data.set('CONFIG_QOM_CAST_DEBUG', get_option('qom_cast_debug'))
2635 config_host_data.set('CONFIG_REPLICATION', get_option('replication').allowed())
2636 config_host_data.set('CONFIG_FSFREEZE', qga_fsfreeze)
2637 config_host_data.set('CONFIG_FSTRIM', qga_fstrim)
2640 config_host_data.set('CONFIG_EPOLL', cc.has_header('sys/epoll.h'))
2641 config_host_data.set('CONFIG_LINUX_MAGIC_H', cc.has_header('linux/magic.h'))
2652 config_host_data.set('CONFIG_VALGRIND_H', valgrind)
2653 config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h'))
2654 config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h'))
2655 config_host_data.set('HAVE_OPENAT2_H', cc.has_header('linux/openat2.h'))
2656 config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h'))
2657 config_host_data.set('HAVE_SYS_DISK_H', cc.has_header('sys/disk.h'))
2658 config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
2659 config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h'))
2661 config_host_data.set('HAVE_AFUNIX_H', cc.has_header('afunix.h'))
2665 config_host_data.set('CONFIG_CLOSE_RANGE', cc.has_function('close_range'))
2666 config_host_data.set('CONFIG_ACCEPT4', cc.has_function('accept4'))
2667 config_host_data.set('CONFIG_CLOCK_ADJTIME', cc.has_function('clock_adjtime'))
2668 config_host_data.set('CONFIG_DUP3', cc.has_function('dup3'))
2669 config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate'))
2670 config_host_data.set('CONFIG_POSIX_FALLOCATE', cc.has_function('posix_fallocate'))
2671 config_host_data.set('CONFIG_SCHED_GETCPU', cc.has_function('sched_getcpu', prefix: '#include <sche…
2674 config_host_data.set('CONFIG_POSIX_MEMALIGN', cc.has_function('posix_memalign', prefix: '#include <…
2675 config_host_data.set('CONFIG_ALIGNED_MALLOC', cc.has_function('_aligned_malloc'))
2676 config_host_data.set('CONFIG_VALLOC', cc.has_function('valloc'))
2677 config_host_data.set('CONFIG_MEMALIGN', cc.has_function('memalign'))
2678 config_host_data.set('CONFIG_PPOLL', cc.has_function('ppoll'))
2679 config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#include <sys/uio.h>'))
2680 config_host_data.set('CONFIG_PTHREAD_FCHDIR_NP', cc.has_function('pthread_fchdir_np'))
2681 config_host_data.set('CONFIG_SENDFILE', cc.has_function('sendfile'))
2682 config_host_data.set('CONFIG_SETNS', cc.has_function('setns') and cc.has_function('unshare'))
2683 config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs'))
2684 config_host_data.set('CONFIG_SYNC_FILE_RANGE', cc.has_function('sync_file_range'))
2685 config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create'))
2686 config_host_data.set('CONFIG_GETLOADAVG', cc.has_function('getloadavg'))
2687 config_host_data.set('HAVE_COPY_FILE_RANGE', cc.has_function('copy_file_range'))
2688 config_host_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs'))
2689 config_host_data.set('HAVE_GLIB_WITH_SLICE_ALLOCATOR', glib_has_gslice)
2690 config_host_data.set('HAVE_GLIB_WITH_ALIGNED_ALLOC', glib_has_aligned_alloc)
2691 config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependencies: util))
2692 config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul', prefix: osdep_prefix))
2693 config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', prefix: '#include <stdlib.h>…
2695 config_host_data.set('HAVE_RBD_NAMESPACE_EXISTS',
2701 config_host_data.set('HAVE_IBV_ADVISE_MR',
2710 args: '-fsanitize=address',
2717 config_host_data.set('CONFIG_ASAN_IFACE_FIBER', have_asan_fiber)
2723 # libinotify-kqueue
2732 config_host_data.set('CONFIG_INOTIFY', have_inotify_init)
2733 config_host_data.set('CONFIG_INOTIFY1', have_inotify_init1)
2736 config_host_data.set('CONFIG_BLKZONED',
2738 config_host_data.set('CONFIG_EPOLL_CREATE1',
2740 config_host_data.set('CONFIG_FALLOCATE_PUNCH_HOLE',
2743 config_host_data.set('CONFIG_FALLOCATE_ZERO_RANGE',
2745 config_host_data.set('CONFIG_FIEMAP',
2748 config_host_data.set('CONFIG_GETCPU',
2750 config_host_data.set('CONFIG_GETRANDOM',
2753 config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK',
2755 config_host_data.set('CONFIG_RTNETLINK',
2757 config_host_data.set('CONFIG_SYSMACROS',
2759 config_host_data.set('HAVE_OPTRESET',
2761 config_host_data.set('HAVE_IPPROTO_MPTCP',
2764 config_host_data.set('HAVE_IO_PREP_PWRITEV2',
2768 config_host_data.set('HAVE_IO_URING_PREP_WRITEV2',
2771 config_host_data.set('HAVE_TCP_KEEPCNT',
2781 # https://github.com/apple/darwin-xnu/blob/xnu-4570.1.46/bsd/man/man4/tcp.4#L172
2782 config_host_data.set('HAVE_TCP_KEEPIDLE',
2792 config_host_data.set('HAVE_TCP_KEEPINTVL',
2803 config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
2806 config_host_data.set('HAVE_STRUCT_STAT_ST_ATIM',
2809 config_host_data.set('HAVE_BLK_ZONE_REP_CAPACITY',
2814 config_host_data.set('CONFIG_IOVEC',
2817 config_host_data.set('HAVE_UTMPX',
2821 config_host_data.set('CONFIG_EVENTFD', cc.links('''
2824 config_host_data.set('CONFIG_FDATASYNC', cc.links(osdep_prefix + '''
2841 # missing-prototype case, we try again with a definitely-bogus prototype.
2849 config_host_data.set('CONFIG_MADVISE', has_madvise)
2850 config_host_data.set('HAVE_MADVISE_WITHOUT_PROTOTYPE', missing_madvise_proto)
2852 config_host_data.set('CONFIG_MEMFD', cc.links(osdep_prefix + '''
2855 config_host_data.set('CONFIG_OPEN_BY_HANDLE', cc.links(osdep_prefix + '''
2863 # i.e. errno is set and -1 is returned. That's not really how POSIX defines the
2866 config_host_data.set('CONFIG_POSIX_MADVISE', cc.links(osdep_prefix + '''
2871 config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links(osdep_prefix + '''
2882 config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links(osdep_prefix + '''
2892 config_host_data.set('CONFIG_PTHREAD_SET_NAME_NP', cc.links(osdep_prefix + '''
2904 config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_prefix + '''
2914 config_host_data.set('CONFIG_PTHREAD_AFFINITY_NP', cc.links(osdep_prefix + '''
2931 config_host_data.set('CONFIG_SIGNALFD', cc.links(osdep_prefix + '''
2933 int main(void) { return signalfd(-1, NULL, SFD_CLOEXEC); }'''))
2934 config_host_data.set('CONFIG_SPLICE', cc.links(osdep_prefix + '''
2943 config_host_data.set('HAVE_MLOCKALL', cc.links(osdep_prefix + '''
2949 config_host_data.set('HAVE_MLOCK_ONFAULT', cc.links(osdep_prefix + '''
2962 config_host_data.set('CONFIG_L2TPV3', have_l2tpv3)
2979 config_host_data.set('CONFIG_NETMAP', have_netmap)
2984 # if this macro is set.
2985 config_host_data.set('HAVE_FSXATTR', cc.links('''
2993 config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles('''
2998 }''', args: ['-Werror']))
3000 # See if 64-bit atomic operations are supported.
3003 config_host_data.set('CONFIG_ATOMIC64', cc.links('''
3016 # has_int128_type is set to false on Emscripten to avoid errors by libffi
3022 config_host_data.set('CONFIG_INT128_TYPE', has_int128_type)
3033 config_host_data.set('CONFIG_INT128', has_int128)
3036 # "do we have 128-bit atomics which are handled inline and specifically not
3039 # We only care about these operations on 16-byte aligned pointers, so
3040 # force 16-byte alignment of the pointer, which may be greater than
3044 __uint128_t *p = __builtin_assume_aligned(av[ac - 1], 16);
3052 config_host_data.set('CONFIG_ATOMIC128', has_atomic128)
3061 config_host_data.set('CONFIG_ATOMIC128_OPT', has_atomic128_opt)
3064 config_host_data.set('CONFIG_CMPXCHG128', cc.links('''
3076 config_host_data.set('CONFIG_GETAUXVAL', cc.links(osdep_prefix + '''
3082 config_host_data.set('CONFIG_ELF_AUX_INFO', cc.links(osdep_prefix + '''
3090 config_host_data.set('CONFIG_USBFS', have_linux_user and cc.compiles('''
3114 config_host_data.set('CONFIG_SECRET_KEYRING', have_keyring)
3132 config_host_data.set('CONFIG_CPUID_H', have_cpuid_h)
3136 config_host_data.set('CONFIG_ASM_HWPROBE_H',
3147 int main(int argc, char *argv[]) { return bar(argv[argc - 1]); }
3170 config_host_data.set('CONFIG_AVX2_OPT', have_avx2)
3171 config_host_data.set('CONFIG_AVX512BW_OPT', have_avx512bw)
3174 config_host_data.set('CONFIG_ARM_AES_BUILTIN', cc.compiles('''
3198 config_host_data.set('CONFIG_MEMBARRIER', get_option('membarrier') \
3212 config_host_data.set('CONFIG_AF_ALG', have_afalg)
3214 config_host_data.set('CONFIG_AF_VSOCK', cc.has_header_symbol(
3228 config_host_data.set('HAVE_VSS_SDK', have_vss_sdk)
3233 config_host_data.set('HAVE__LOCK_FILE', cc.links('''
3243 config_host_data.set('HAVE_SPICE_QXL_GL_SCANOUT2',
3264 error('mingw must provide setjmp/longjmp for windows-arm64')
3334 config_target = { 'TARGET_NAME': target.split('-')[0] }
3335 if target.endswith('linux-user')
3343 elif target.endswith('bsd-user')
3355 if target.endswith('-user')
3368 # Disallow 64-bit on 32-bit emulation and virtualization
3423 # Note that TARGET_BASE_ARCH ends up in config-target.h but it is
3425 config_target_data.set('TARGET_' + v.to_upper(), 1)
3429 config_target_data.set(k, 1)
3431 config_target_data.set(k, 0)
3433 config_target_data.set(k, v)
3436 config_target_data.set('QEMU_ARCH',
3438 config_target_h += {target: configure_file(output: target + '-config-target.h',
3441 if target.endswith('-softmmu')
3445 # PVG is not cross-architecture. Use accelerator_targets as a proxy to
3452 config_devices_mak = target + '-config-devices.mak'
3459 get_option('default_devices') ? '--defconfig' : '--allnoconfig',
3466 config_devices_data.set(k, 1)
3469 config_devices_h += {target: configure_file(output: target + '-config-devices.h',
3488 genh += custom_target('config-poison.h',
3490 output: 'config-poison.h',
3492 command: [find_program('scripts/make-config-poison.sh'),
3505 libvfio_user_proj = subproject('libvfio-user', required: true)
3511 libvhost_user = subproject('libvhost-user')
3525 config_host_h = configure_file(output: 'config-host.h', configuration: config_host_data)
3530 qapi_gen = find_program('scripts/qapi-gen.py')
3546 meson.current_source_dir() / 'scripts/qapi-gen.py'
3551 '--backend=' + ','.join(get_option('trace_backends'))
3573 qemu_version_cmd = [find_program('scripts/qemu-version.sh'),
3576 qemu_version = custom_target('qemu-version.h',
3577 output: 'qemu-version.h',
3586 ['qemu-options.hx', 'qemu-options.def'],
3587 ['qemu-img-cmds.hx', 'qemu-img-cmds.h'],
3591 ['hmp-commands.hx', 'hmp-commands.h'],
3592 ['hmp-commands-info.hx', 'hmp-commands-info.h'],
3600 command: [hxtool, '-h', '@INPUT0@'])
3619 trace_events_subdirs += [ 'linux-user' ]
3622 trace_events_subdirs += [ 'bsd-user' ]
3671 'hw/pci-host',
3776 …libmodulecommon = static_library('module-common', files('module-common.c') + genh, pic: true, c_ar…
3777 …ndency(objects: libmodulecommon.extract_all_objects(recursive: false), compile_args: '-DBUILD_DSO')
3787 event_loop_base = files('event-loop-base.c')
3788 event_loop_base = static_library('event-loop-base',
3812 output: 'decode-@BASENAME@.c.inc',
3813 arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTPUT@'])
3829 'qemu-io-cmds.c',
3841 'blockdev-nbd.c',
3843 'job-qmp.c',
3846 # os-posix.c contains POSIX-specific functions used by qemu-storage-daemon,
3847 # os-win32.c does not
3849 system_ss.add(files('os-win32.c'))
3851 blockdev_ss.add(files('os-wasm.c'))
3853 blockdev_ss.add(files('os-posix.c'))
3857 common_ss.add(files('cpu-common.c'))
3858 specific_ss.add(files('cpu-target.c'))
3866 # impossible, as the alias is restricted to page-vary-common.c. Indeed,
3867 # without lto, not even the alias is required -- we simply use different
3869 pagevary = files('page-vary-common.c')
3871 pagevary_flags = ['-fno-lto']
3873 pagevary_flags += '-fno-sanitize=cfi-icall'
3875 pagevary = static_library('page-vary-common', sources: pagevary + genh,
3880 specific_ss.add(files('page-target.c', 'page-vary-target.c'))
3882 common_ss.add(files('target-info.c'))
3883 specific_ss.add(files('target-info-stub.c'))
3905 subdir('common-user')
3906 subdir('bsd-user')
3907 subdir('linux-user')
3920 modinfo_collect = find_program('scripts/modinfo-collect.py')
3921 modinfo_generate = find_program('scripts/modinfo-generate.py')
3936 sl = static_library(d + '-' + m, [genh, module_ss.sources()],
3950 modinfo_files += custom_target(d + '-' + m + '.modinfo',
3951 output: d + '-' + m + '.modinfo',
3971 if target.endswith('-softmmu')
3974 c_args = ['-DCOMPILING_PER_TARGET',
3975 '-DCONFIG_TARGET="@0@-config-target.h"'.format(target),
3976 '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)]
3979 module_name = d + '-' + m + '-' + config_target['TARGET_NAME']
3997 … command: [modinfo_collect, '--target', target, '@INPUT@'])
4009 if target.endswith('-softmmu')
4011 config_devices_mak = target + '-config-devices.mak'
4012 modinfo_src = custom_target('modinfo-' + target + '.c',
4013 output: 'modinfo-' + target + '.c',
4015 … command: [modinfo_generate, '--devices', config_devices_mak, '@INPUT@'],
4018 modinfo_lib = static_library('modinfo-' + target + '.c', modinfo_src)
4119 c_args: ['-DCONFIG_USER_ONLY',
4120 '-DCOMPILING_SYSTEM_VS_USER'],
4127 c_args: ['-DCONFIG_SOFTMMU',
4128 '-DCOMPILING_SYSTEM_VS_USER'],
4166 target_c_args = ['-DCPU_DEFS_H']
4167 target_system_c_args = target_c_args + ['-DCOMPILING_SYSTEM_VS_USER', '-DCONFIG_SOFTMMU']
4206 # We would like to use --generate-cstr, but it is only available
4208 # is 0.60.x (Debian 12 has 0.60.1) which introduces --allowlist-file.
4210 '--disable-header-comment',
4211 '--raw-line', '// @generated',
4212 '--ctypes-prefix', 'std::os::raw',
4213 '--generate-block',
4214 '--impl-debug',
4215 '--no-doc-comments',
4216 '--with-derive-default',
4217 '--no-layout-tests',
4218 '--no-prepend-enum-name',
4219 '--allowlist-file', meson.project_source_root() + '/include/.*',
4220 '--allowlist-file', meson.project_source_root() + '/.*',
4221 '--allowlist-file', meson.project_build_root() + '/.*'
4225 bindgen_args += ['--no-rustfmt-bindings']
4227 bindgen_args += ['--formatter', 'none']
4231 bindgen_args += ['--rust-target', '1.59']
4235 bindgen_args += ['--size_t-is-usize']
4237 bindgen_args += ['--merge-extern-blocks']
4253 bindgen_args += ['--rustified-enum', enum]
4260 bindgen_args += ['--bitfield-enum', enum]
4297 c_args = ['-DCOMPILING_PER_TARGET',
4298 '-DCONFIG_TARGET="@0@-config-target.h"'.format(target),
4304 target_inc += include_directories('linux-headers', is_system: true)
4306 if target.endswith('-softmmu')
4319 c_args += ['-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)]
4332 base_dir = 'linux-user'
4335 base_dir = 'bsd-user'
4336 target_inc += include_directories('bsd-user/' / host_os)
4337 target_inc += include_directories('bsd-user/host/' / host_arch)
4357 gdbstub_xml = custom_target(target + '-gdbstub-xml.c',
4358 output: target + '-gdbstub-xml.c',
4429 lib = static_library('qemu-' + target,
4437 if target.endswith('-softmmu')
4439 'name': 'qemu-system-' + target_name,
4446 'name': 'qemu-system-' + target_name + 'w',
4455 'name': 'qemu-fuzz-' + target_name,
4463 'name': 'qemu-' + target_name,
4472 exe_name += '-unsigned'
4485 icon = 'pc-bios/qemu.rsrc'
4503 meson.add_install_script(entitlement, '--install',
4512 'probe-prefix': 'qemu.' + target_type + '.' + target_name,
4521 install_headers('include/qemu/qemu-plugin.h')
4531 # Don't build qemu-keymap if xkbcommon is not explicitly enabled
4534 # used for the update-keymaps target, so include rules even if !have_tools
4535 qemu_keymap = executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c') + genh,
4540 qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep],
4543 qemu_io = executable('qemu-io', files('qemu-io.c'),
4546 qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
4551 subdir('storage-daemon')
4553 foreach exe: [ 'qemu-img', 'qemu-io', 'qemu-nbd', 'qemu-storage-daemon']
4556 'probe-prefix': 'qemu.' + exe.substring(5).replace('-', '_')
4562 executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'),
4567 subdir('contrib/vhost-user-blk')
4568 subdir('contrib/vhost-user-gpu')
4569 subdir('contrib/vhost-user-input')
4570 subdir('contrib/vhost-user-scsi')
4574 executable('qemu-bridge-helper', files('qemu-bridge-helper.c'),
4579 executable('qemu-pr-helper', files('scsi/qemu-pr-helper.c', 'scsi/utils.c'),
4585 executable('qemu-vmsr-helper', files('tools/i386/qemu-vmsr-helper.c'),
4593 subdir('contrib/ivshmem-client')
4594 subdir('contrib/ivshmem-server')
4601 …{'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_dir() / t['exe'], 'install': false…
4603 {'ext': '-simpletrace.stp', 'fmt': 'simpletrace-stap', 'bin': '', 'install': true},
4604 {'ext': '-log.stp', 'fmt': 'log-stap', 'bin': '', 'install': true},
4607 tracetool, '--group=all', '--format=' + stp['fmt'],
4608 '--binary=' + stp['bin'],
4609 '--probe-prefix=' + t['probe-prefix'],
4626 subdir('pc-bios')
4645 '--',
4646 '-DDISPLAYVERSION=' + meson.project_version(),
4649 nsis_cmd += '-DCONFIG_DOCUMENTATION=y'
4652 nsis_cmd += '-DCONFIG_GTK=y'
4656 output: 'qemu-setup-' + meson.project_version() + '.exe',
4697 summary_info += {'sphinx-build': sphinx_build}
4719 summary_info += {'system-mode emulation': have_system}
4720 summary_info += {'user-mode emulation': have_user}
4733 summary_info += {'Trace output file': get_option('trace_file') + '-<pid>'}
4737 summary_info += {'vhost-kernel support': have_vhost_kernel}
4738 summary_info += {'vhost-net support': have_vhost_net}
4739 summary_info += {'vhost-user support': have_vhost_user}
4740 summary_info += {'vhost-user-crypto support': have_vhost_user_crypto}
4741 summary_info += {'vhost-user-blk server support': have_vhost_user_blk_server}
4742 summary_info += {'vhost-vdpa support': have_vhost_vdpa}
4758 summary_info += {'Objective-C compiler': ' '.join(meson.get_compiler('objc').cmd_array())}
4760 summary_info += {'Objective-C compiler': false}
4771 option_cflags = (get_option('debug') ? ['-g'] : [])
4773 option_cflags += ['-O' + get_option('optimization')]
4794 summary_info += {'link-time optimization (LTO)': get_option('b_lto')}
4816 # snarf the cross-compilation information for tests
4820 tcg_mak = meson.current_build_dir() / 'tests/tcg' / target / 'config-target.mak'
4863 summary_info += {'vfio-user server': vfio_user_server_allowed}
4908 summary_info += {'rng-none': get_option('rng_none')}
4918 summary_info += {'D-Bus display': dbus_display}
4987 summary_info += {'libcap-ng support': libcap_ng}
5005 summary_info += {'hv-balloon support': hv_balloon}
5027 summary_info += {'libinotify-kqueue': inotify}
5053 message('Support for 32-bit CPU host architecture ' + cpu + ' is going')
5073 message('contact the developers at qemu-devel@nongnu.org.')
5091 message('Use --disable-relocatable to remove this warning.')