Lines Matching +full:xtensa +full:- +full:softmmu
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')
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']
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'
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']
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 #
855 depend_files: files('pc-bios/qemu-nsis.ico'),
875 emulator_link_args = cc.get_supported_link_arguments('-Wl,-z,wxneeded')
880 # Host-specific configuration of accelerators #
889 error('WHPX requires 64-bit host')
917 error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu))
921 error('WebAssembly host requires --enable-tcg-interpreter')
927 warning('It is strongly recommended to remove the --enable-tcg-interpreter')
938 add_project_arguments('-iquote', meson.current_source_dir() / 'tcg' / tcg_arch,
960 method: 'pkg-config')
967 method: 'pkg-config',
970 method: 'pkg-config',
973 method: 'pkg-config',
976 method: 'pkg-config',
979 method: 'pkg-config',
983 method: 'pkg-config')])
1008 # Use -D to pick just one of the test programs in scripts/xen-detect.c
1011 ('0' + xen_version[1]).substring(-2) + \
1012 ('0' + xen_version[2]).substring(-2)
1013 if cc.links(files('scripts/xen-detect.c'),
1014 args: '-DCONFIG_XEN_CTRL_INTERFACE_VERSION=' + xen_ctrl_version,
1045 glib_pc = dependency('glib-2.0', version: glib_req_ver, required: true,
1046 method: 'pkg-config')
1049 gmodule = dependency('gmodule-export-2.0', version: glib_req_ver, required: true,
1050 method: 'pkg-config')
1052 gmodule = dependency('gmodule-no-export-2.0', version: glib_req_ver, required: true,
1053 method: 'pkg-config')
1058 # This workaround is required due to a bug in pkg-config file for glib as it
1059 # doesn't define GLIB_STATIC_COMPILATION for pkg-config --static
1061 glib_cflags += ['-DGLIB_STATIC_COMPILATION']
1066 # problems on multi-arch where people try to build
1067 # 32-bit QEMU while pointing at 64-bit glib headers
1074 typedef char qemu_build_bug_on[(x)?-1:1] __attribute__((unused));
1082 to the right pkg-config files for your build target.''')
1098 meson.override_dependency('glib-2.0', glib)
1106 gdbus_codegen_error = '@0@ requires gdbus-codegen, please install libgio'
1108 gio = dependency('gio-2.0', required: get_option('gio'),
1109 method: 'pkg-config')
1123 gdbus_codegen = find_program('gdbus-codegen',
1125 gio_unix = dependency('gio-unix-2.0', required: get_option('gio'),
1126 method: 'pkg-config')
1133 gdbus_codegen_error = '@0@ uses gdbus-codegen, which does not support control flow integrity'
1136 xml_pp = find_program('scripts/xml-preprocess.py')
1140 lttng = dependency('lttng-ust', required: true, version: '>= 2.1',
1141 method: 'pkg-config')
1145 pixman = dependency('pixman-1', required: get_option('pixman'), version:'>=0.21.8',
1146 method: 'pkg-config')
1167 method: 'pkg-config')
1177 method: 'pkg-config')
1199 cc.links(libattr_test, dependencies: libattr, args: '-DCONFIG_LIBATTR')
1233 method: 'pkg-config')
1243 libcap_ng = cc.find_library('cap-ng', has_headers: ['cap-ng.h'],
1247 #include <cap-ng.h>
1255 error('could not link libcap-ng')
1257 warning('could not link libcap-ng, disabling')
1265 method: 'pkg-config')
1271 method: 'pkg-config')
1274 # When using a system-wide shared libslirp, the type information for the
1277 # with control-flow integrity.
1280 error('Control-Flow Integrity requires libslirp 4.7.')
1282 warning('Cannot use libslirp since Control-Flow Integrity requires libslirp >= 4.7.')
1313 method: 'pkg-config')
1318 method: 'pkg-config')
1323 method: 'pkg-config')
1327 pipewire = dependency('libpipewire-0.3', version: '>=0.3.60',
1329 method: 'pkg-config')
1334 method: 'pkg-config')
1339 spice_protocol = dependency('spice-protocol', version: '>=0.14.0',
1341 method: 'pkg-config')
1349 spice = dependency('spice-server', version: '>=0.14.0',
1351 method: 'pkg-config')
1361 method: 'pkg-config')
1367 method: 'pkg-config')
1373 method: 'pkg-config')
1379 method: 'pkg-config')
1382 method: 'pkg-config')
1392 method: 'pkg-config')
1400 method: 'pkg-config',
1406 method: 'pkg-config',
1412 method: 'pkg-config',
1418 method: 'pkg-config',
1424 method: 'pkg-config',
1504 method: 'pkg-config')
1506 curses_compile_args = ['-DNCURSES_WIDECHAR=1']
1520 curses_compile_args += ['-I/usr/include/ncursesw']
1541 foreach link_args : [ ['-liconv'], [] ]
1545 # However, without adding glib to the dependencies -L/usr/local/lib will not be
1550 iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
1551 return conv != (iconv_t) -1;
1597 # Some versions of SDL have problems with -Wundef
1602 ''', dependencies: sdl, args: '-Werror=undef')
1603 sdl = declare_dependency(compile_args: '-Wno-undef',
1608 method: 'pkg-config')
1611 error('sdl-image required, but SDL was @0@'.format(
1647 glusterfs = dependency('glusterfs-api', version: '>=3',
1649 method: 'pkg-config')
1697 error('could not enable hv-balloon, update your glib')
1699 warning('could not find glib support for hv-balloon, disabling')
1707 method: 'pkg-config',
1762 dsound = declare_dependency(link_args: ['-lole32', '-ldxguid'])
1780 epoxy = dependency('epoxy', method: 'pkg-config',
1790 gbm = dependency('gbm', method: 'pkg-config', required: false)
1817 method: 'pkg-config',
1824 method: 'pkg-config',
1854 # Debian has removed -lgpg-error from libgcrypt-config
1860 cc.find_library('gpg-error', required: true)],
1888 method: 'pkg-config',
1921 // HMAC-SM3 test
1936 method: 'pkg-config',
1939 # Some versions of capstone have broken pkg-config file
1940 # that reports a wrong -I path, causing the #include to
1952 gmp = dependency('gmp', required: false, method: 'pkg-config')
1955 method: 'pkg-config',
1970 gtk = dependency('gtk+-3.0', version: '>=3.22.0',
1971 method: 'pkg-config',
1974 gtkx11 = dependency('gtk+-x11-3.0', version: '>=3.22.0',
1975 method: 'pkg-config',
1981 vte = dependency('vte-2.91',
1982 method: 'pkg-config',
1992 x11 = dependency('x11', method: 'pkg-config', required: gtkx11.found())
1997 method: 'pkg-config')
2009 method: 'pkg-config')
2014 compile_args: '-DSTRUCT_IOVEC_DEFINED')
2044 snappy = cc.find_library('snappy', has_headers: ['snappy-c.h'],
2048 #include <snappy-c.h>
2135 version: '>=2.5.1', method: 'pkg-config')
2139 u2f = dependency('u2f-emu', required: get_option('u2f'),
2140 method: 'pkg-config')
2144 canokey = dependency('canokey-qemu', required: get_option('canokey'),
2145 method: 'pkg-config')
2149 usbredir = dependency('libusbredirparser-0.5', required: get_option('usb_redir'),
2150 version: '>=0.6', method: 'pkg-config')
2154 libusb = dependency('libusb-1.0', required: get_option('libusb'),
2155 version: '>=1.0.13', method: 'pkg-config')
2161 method: 'pkg-config')
2166 version: '>=57', method: 'pkg-config')
2172 method: 'pkg-config')
2177 method: 'pkg-config')
2185 method: 'pkg-config')
2202 error('malloc_trim not available with non-libc memory allocator')
2217 * function availability on recentish Mingw-w64 platforms. */
2228 error_message: 'vhost_user_blk_server requires vhost-user support') \
2233 error('Cannot enable fuse-lseek while fuse is disabled')
2237 version: '>=3.1', method: 'pkg-config')
2246 error('fuse-lseek requires libfuse >=3.8, found ' + fuse.version())
2248 error('fuse-lseek requires libfuse, which was not found')
2275 …ependency('libbpf', version: '>=' + bpf_version, required: get_option('bpf'), method: 'pkg-config')
2299 version: '>=1.4.0', method: 'pkg-config')
2312 method: 'pkg-config',
2317 # config-host.h #
2369 error_message: '-display dbus requires glib>=2.64') \
2371 error_message: gdbus_codegen_error.format('-display dbus')) \
2376 error_message: 'virtio-9p (virtfs) requires Linux or macOS') \
2378 … error_message: 'virtio-9p (virtfs) on macOS requires the presence of pthread_fchdir_np') \
2380 error_message: 'virtio-9p (virtfs) on Linux requires libattr-devel') \
2439 meson.current_source_dir() / 'scripts/qemu-stamp.py',
2440 meson.project_version(), get_option('pkgversion'), '--',
2465 error('Cannot enable module-upgrades as modules are not enabled')
2608 ('0' + xen_version[1]).substring(-2) + \
2609 ('0' + xen_version[2]).substring(-2)
2707 args: '-fsanitize=address',
2720 # libinotify-kqueue
2778 # https://github.com/apple/darwin-xnu/blob/xnu-4570.1.46/bsd/man/man4/tcp.4#L172
2838 # missing-prototype case, we try again with a definitely-bogus prototype.
2860 # i.e. errno is set and -1 is returned. That's not really how POSIX defines the
2930 int main(void) { return signalfd(-1, NULL, SFD_CLOEXEC); }'''))
2995 }''', args: ['-Werror']))
2997 # See if 64-bit atomic operations are supported.
3033 # "do we have 128-bit atomics which are handled inline and specifically not
3036 # We only care about these operations on 16-byte aligned pointers, so
3037 # force 16-byte alignment of the pointer, which may be greater than
3041 __uint128_t *p = __builtin_assume_aligned(av[ac - 1], 16);
3144 int main(int argc, char *argv[]) { return bar(argv[argc - 1]); }
3261 error('mingw must provide setjmp/longjmp for windows-arm64')
3299 'xtensa' : ['CONFIG_XTENSA_DIS'],
3331 config_target = { 'TARGET_NAME': target.split('-')[0] }
3332 if target.endswith('linux-user')
3340 elif target.endswith('bsd-user')
3348 elif target.endswith('softmmu')
3352 if target.endswith('-user')
3365 # Disallow 64-bit on 32-bit emulation and virtualization
3420 # Note that TARGET_BASE_ARCH ends up in config-target.h but it is
3435 config_target_h += {target: configure_file(output: target + '-config-target.h',
3438 if target.endswith('-softmmu')
3442 # PVG is not cross-architecture. Use accelerator_targets as a proxy to
3449 config_devices_mak = target + '-config-devices.mak'
3456 get_option('default_devices') ? '--defconfig' : '--allnoconfig',
3466 config_devices_h += {target: configure_file(output: target + '-config-devices.h',
3485 genh += custom_target('config-poison.h',
3487 output: 'config-poison.h',
3489 command: [find_program('scripts/make-config-poison.sh'),
3502 libvfio_user_proj = subproject('libvfio-user', required: true)
3508 libvhost_user = subproject('libvhost-user')
3522 config_host_h = configure_file(output: 'config-host.h', configuration: config_host_data)
3527 qapi_gen = find_program('scripts/qapi-gen.py')
3543 meson.current_source_dir() / 'scripts/qapi-gen.py'
3548 '--backend=' + ','.join(get_option('trace_backends'))
3570 qemu_version_cmd = [find_program('scripts/qemu-version.sh'),
3573 qemu_version = custom_target('qemu-version.h',
3574 output: 'qemu-version.h',
3583 ['qemu-options.hx', 'qemu-options.def'],
3584 ['qemu-img-cmds.hx', 'qemu-img-cmds.h'],
3588 ['hmp-commands.hx', 'hmp-commands.h'],
3589 ['hmp-commands-info.hx', 'hmp-commands-info.h'],
3597 command: [hxtool, '-h', '@INPUT0@'])
3616 trace_events_subdirs += [ 'linux-user' ]
3619 trace_events_subdirs += [ 'bsd-user' ]
3668 'hw/pci-host',
3773 …libmodulecommon = static_library('module-common', files('module-common.c') + genh, pic: true, c_ar…
3774 …ndency(objects: libmodulecommon.extract_all_objects(recursive: false), compile_args: '-DBUILD_DSO')
3784 event_loop_base = files('event-loop-base.c')
3785 event_loop_base = static_library('event-loop-base',
3809 output: 'decode-@BASENAME@.c.inc',
3810 arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTPUT@'])
3826 'qemu-io-cmds.c',
3838 'blockdev-nbd.c',
3840 'job-qmp.c',
3843 # os-posix.c contains POSIX-specific functions used by qemu-storage-daemon,
3844 # os-win32.c does not
3846 system_ss.add(files('os-win32.c'))
3848 blockdev_ss.add(files('os-wasm.c'))
3850 blockdev_ss.add(files('os-posix.c'))
3854 common_ss.add(files('cpu-common.c'))
3855 specific_ss.add(files('cpu-target.c'))
3863 # impossible, as the alias is restricted to page-vary-common.c. Indeed,
3864 # without lto, not even the alias is required -- we simply use different
3866 pagevary = files('page-vary-common.c')
3868 pagevary_flags = ['-fno-lto']
3870 pagevary_flags += '-fno-sanitize=cfi-icall'
3872 pagevary = static_library('page-vary-common', sources: pagevary + genh,
3877 specific_ss.add(files('page-target.c', 'page-vary-target.c'))
3879 common_ss.add(files('target-info.c'))
3880 specific_ss.add(files('target-info-stub.c'))
3902 subdir('common-user')
3903 subdir('bsd-user')
3904 subdir('linux-user')
3917 modinfo_collect = find_program('scripts/modinfo-collect.py')
3918 modinfo_generate = find_program('scripts/modinfo-generate.py')
3933 sl = static_library(d + '-' + m, [genh, module_ss.sources()],
3947 modinfo_files += custom_target(d + '-' + m + '.modinfo',
3948 output: d + '-' + m + '.modinfo',
3968 if target.endswith('-softmmu')
3971 c_args = ['-DCOMPILING_PER_TARGET',
3972 '-DCONFIG_TARGET="@0@-config-target.h"'.format(target),
3973 '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)]
3976 module_name = d + '-' + m + '-' + config_target['TARGET_NAME']
3994 … command: [modinfo_collect, '--target', target, '@INPUT@'])
4006 if target.endswith('-softmmu')
4008 config_devices_mak = target + '-config-devices.mak'
4009 modinfo_src = custom_target('modinfo-' + target + '.c',
4010 output: 'modinfo-' + target + '.c',
4012 … command: [modinfo_generate, '--devices', config_devices_mak, '@INPUT@'],
4015 modinfo_lib = static_library('modinfo-' + target + '.c', modinfo_src)
4116 c_args: ['-DCONFIG_USER_ONLY',
4117 '-DCOMPILING_SYSTEM_VS_USER'],
4124 c_args: ['-DCONFIG_SOFTMMU',
4125 '-DCOMPILING_SYSTEM_VS_USER'],
4163 target_c_args = ['-DCPU_DEFS_H']
4164 target_system_c_args = target_c_args + ['-DCOMPILING_SYSTEM_VS_USER', '-DCONFIG_SOFTMMU']
4204 # We would like to use --generate-cstr, but it is only available
4206 # is 0.60.x (Debian 12 has 0.60.1) which introduces --allowlist-file.
4208 '--disable-header-comment',
4209 '--raw-line', '// @generated',
4210 '--ctypes-prefix', 'std::os::raw',
4211 '--generate-block',
4212 '--impl-debug',
4213 '--no-doc-comments',
4214 '--with-derive-default',
4215 '--no-layout-tests',
4216 '--no-prepend-enum-name',
4217 '--allowlist-file', meson.project_source_root() + '/include/.*',
4218 '--allowlist-file', meson.project_source_root() + '/.*',
4219 '--allowlist-file', meson.project_build_root() + '/.*'
4223 bindgen_args_common += ['--no-rustfmt-bindings']
4225 bindgen_args_common += ['--formatter', 'none']
4229 bindgen_args_common += ['--rust-target', '1.59']
4233 bindgen_args_common += ['--size_t-is-usize']
4235 bindgen_args_common += ['--merge-extern-blocks']
4256 c_args = ['-DCOMPILING_PER_TARGET',
4257 '-DCONFIG_TARGET="@0@-config-target.h"'.format(target),
4263 target_inc += include_directories('linux-headers', is_system: true)
4265 if target.endswith('-softmmu')
4278 c_args += ['-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)]
4291 base_dir = 'linux-user'
4294 base_dir = 'bsd-user'
4295 target_inc += include_directories('bsd-user/' / host_os)
4296 target_inc += include_directories('bsd-user/host/' / host_arch)
4316 gdbstub_xml = custom_target(target + '-gdbstub-xml.c',
4317 output: target + '-gdbstub-xml.c',
4388 lib = static_library('qemu-' + target,
4396 if target.endswith('-softmmu')
4398 'name': 'qemu-system-' + target_name,
4405 'name': 'qemu-system-' + target_name + 'w',
4414 'name': 'qemu-fuzz-' + target_name,
4422 'name': 'qemu-' + target_name,
4431 exe_name += '-unsigned'
4444 icon = 'pc-bios/qemu.rsrc'
4462 meson.add_install_script(entitlement, '--install',
4471 'probe-prefix': 'qemu.' + target_type + '.' + target_name,
4480 install_headers('include/qemu/qemu-plugin.h')
4490 # Don't build qemu-keymap if xkbcommon is not explicitly enabled
4493 # used for the update-keymaps target, so include rules even if !have_tools
4494 qemu_keymap = executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c') + genh,
4499 qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep],
4502 qemu_io = executable('qemu-io', files('qemu-io.c'),
4505 qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
4510 subdir('storage-daemon')
4512 foreach exe: [ 'qemu-img', 'qemu-io', 'qemu-nbd', 'qemu-storage-daemon']
4515 'probe-prefix': 'qemu.' + exe.substring(5).replace('-', '_')
4521 executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'),
4526 subdir('contrib/vhost-user-blk')
4527 subdir('contrib/vhost-user-gpu')
4528 subdir('contrib/vhost-user-input')
4529 subdir('contrib/vhost-user-scsi')
4533 executable('qemu-bridge-helper', files('qemu-bridge-helper.c'),
4538 executable('qemu-pr-helper', files('scsi/qemu-pr-helper.c', 'scsi/utils.c'),
4544 executable('qemu-vmsr-helper', files('tools/i386/qemu-vmsr-helper.c'),
4552 subdir('contrib/ivshmem-client')
4553 subdir('contrib/ivshmem-server')
4560 …{'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_dir() / t['exe'], 'install': false…
4562 {'ext': '-simpletrace.stp', 'fmt': 'simpletrace-stap', 'bin': '', 'install': true},
4563 {'ext': '-log.stp', 'fmt': 'log-stap', 'bin': '', 'install': true},
4566 tracetool, '--group=all', '--format=' + stp['fmt'],
4567 '--binary=' + stp['bin'],
4568 '--probe-prefix=' + t['probe-prefix'],
4585 subdir('pc-bios')
4604 '--',
4605 '-DDISPLAYVERSION=' + meson.project_version(),
4608 nsis_cmd += '-DCONFIG_DOCUMENTATION=y'
4611 nsis_cmd += '-DCONFIG_GTK=y'
4615 output: 'qemu-setup-' + meson.project_version() + '.exe',
4656 summary_info += {'sphinx-build': sphinx_build}
4678 summary_info += {'system-mode emulation': have_system}
4679 summary_info += {'user-mode emulation': have_user}
4692 summary_info += {'Trace output file': get_option('trace_file') + '-<pid>'}
4696 summary_info += {'vhost-kernel support': have_vhost_kernel}
4697 summary_info += {'vhost-net support': have_vhost_net}
4698 summary_info += {'vhost-user support': have_vhost_user}
4699 summary_info += {'vhost-user-crypto support': have_vhost_user_crypto}
4700 summary_info += {'vhost-user-blk server support': have_vhost_user_blk_server}
4701 summary_info += {'vhost-vdpa support': have_vhost_vdpa}
4717 summary_info += {'Objective-C compiler': ' '.join(meson.get_compiler('objc').cmd_array())}
4719 summary_info += {'Objective-C compiler': false}
4730 option_cflags = (get_option('debug') ? ['-g'] : [])
4732 option_cflags += ['-O' + get_option('optimization')]
4753 summary_info += {'link-time optimization (LTO)': get_option('b_lto')}
4775 # snarf the cross-compilation information for tests
4779 tcg_mak = meson.current_build_dir() / 'tests/tcg' / target / 'config-target.mak'
4822 summary_info += {'vfio-user server': vfio_user_server_allowed}
4867 summary_info += {'rng-none': get_option('rng_none')}
4877 summary_info += {'D-Bus display': dbus_display}
4946 summary_info += {'libcap-ng support': libcap_ng}
4964 summary_info += {'hv-balloon support': hv_balloon}
4986 summary_info += {'libinotify-kqueue': inotify}
5012 message('Support for 32-bit CPU host architecture ' + cpu + ' is going')
5032 message('contact the developers at qemu-devel@nongnu.org.')
5050 message('Use --disable-relocatable to remove this warning.')