Lines Matching +full:i2c +full:- +full:alias +full:- +full:pool

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')
112 …dgen.version() + ' is unsupported. You can install a new version with "cargo install bindgen-cli"')
119 message('To use Rust you can install a new version with "cargo install bindgen-cli"')
127 '--rustc-version', rustc.version(),
128 '--workspace', meson.project_source_root() / 'rust']
130 rustc_args += ['--strict-lints']
135 rustc_lint_args = run_command(rustc_args, '--lints',
140 # is safe; https://github.com/rust-lang/rust/pull/54675 says that
141 # passing -nodefaultlibs to the linker "was more ideological to
144 ['--cfg', 'MESON', '-C', 'default-linker-libraries'],
146 add_project_arguments(rustc_lint_args + ['--cfg', 'MESON'],
158 # instead. QEMU --enable-modules depends on this because the SystemTap
161 add_global_arguments('-DSTAP_SDT_V2',
172 edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu', 'riscv64-softm…
194 args: ['-Werror', '-fsanitize=fuzzer'])
195 error('Your compiler does not support -fsanitize=fuzzer')
212 # Miscellaneous Linux-only features
221 .require(host_os == 'linux', error_message: 'vfio-user server is supported only on Linux') \
232 error_message: 'vhost-user is not available on Windows').allowed()
235 error_message: 'vhost-vdpa is only available on Linux').allowed()
238 error_message: 'vhost-kernel is only available on Linux').allowed()
241 error_message: 'vhost-crypto requires vhost-user to be enabled').allowed()
284 kvm_targets = ['i386-softmmu']
286 kvm_targets = ['i386-softmmu', 'x86_64-softmmu']
288 kvm_targets = ['aarch64-softmmu']
290 kvm_targets = ['s390x-softmmu']
292 kvm_targets = ['ppc-softmmu']
294 kvm_targets = ['ppc-softmmu', 'ppc64-softmmu']
296 kvm_targets = ['mips-softmmu', 'mipsel-softmmu']
298 kvm_targets = ['mips-softmmu', 'mipsel-softmmu', 'mips64-softmmu', 'mips64el-softmmu']
300 kvm_targets = ['riscv32-softmmu']
302 kvm_targets = ['riscv64-softmmu']
304 kvm_targets = ['loongarch64-softmmu']
311 xen_targets = ['i386-softmmu']
313 xen_targets = ['i386-softmmu', 'x86_64-softmmu']
316 xen_targets = ['i386-softmmu']
319 xen_targets = ['i386-softmmu', 'x86_64-softmmu', 'aarch64-softmmu']
327 'CONFIG_HVF': ['aarch64-softmmu']
331 'CONFIG_HVF': ['x86_64-softmmu'],
332 'CONFIG_NVMM': ['i386-softmmu', 'x86_64-softmmu'],
333 'CONFIG_WHPX': ['i386-softmmu', 'x86_64-softmmu'],
362 # We use -fwrapv to tell the compiler that we require a C dialect where
364 # 2s-complement style results. (Both clang and gcc agree that it
368 '-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE',
369 '-fno-strict-aliasing', '-fno-common', '-fwrapv' ]
377 qemu_common_flags += '-DOS_OBJECT_USE_OBJC=0'
381 qemu_common_flags += '-D_XOPEN_SOURCE=600'
383 qemu_common_flags += '-D__EXTENSIONS__'
385 qemu_common_flags += ['-DB_USE_POSITIVE_POSIX_ERRORS', '-D_BSD_SOURCE', '-fPIC']
389 error('On windows, you need to use lld with clang - use msys2 clang64/clangarm64 env')
393 # Choose instruction set (currently x86-only)
397 # __sync_fetch_and_and requires at least -march=i486. Many toolchains
413 qemu_isa_flags += ['-march=i486']
416 # Pick x86-64 baseline version
419 error('x86_64-v1 required for x86-64 hosts')
425 qemu_common_flags = ['-mfpmath=sse'] + qemu_common_flags
428 # x86-64-v1, so only include -mneeded for x86-64 version 2 and above
429 qemu_isa_flags += ['-mcx16']
433 qemu_isa_flags += ['-mpopcnt']
434 qemu_isa_flags += cc.get_supported_arguments('-mneeded')
437 qemu_isa_flags += ['-mmovbe', '-mabm', '-mbmi', '-mbmi2', '-mfma', '-mf16c']
442 qemu_isa_flags += ['-msse2']
444 qemu_isa_flags += ['-msse4.2']
446 qemu_isa_flags += ['-mavx2']
448 qemu_isa_flags += ['-mavx512f', '-mavx512bw', '-mavx512cd', '-mavx512dq', '-mavx512vl']
455 qemu_ldflags += get_option('b_pie') ? '-static-pie' : '-static'
461 # -no-pie is supposedly a linker flag that has no effect on the compiler
464 # a compiler command-line flag.
466 # What about linker flags? For a static build, no PIE is implied by -static
469 # distro and do not use --disable-pie in the meanwhile). For dynamic linking,
470 # instead, we can't add -no-pie because it overrides -shared: the linker then
472 # don't add -no-pie anywhere and cross fingers. :(
474 qemu_common_flags += cc.get_supported_arguments('-fno-pie', '-no-pie')
481 char arr[64], *p = arr, *c = argv[argc - 1];
488 foreach arg : ['-fstack-protector-strong', '-fstack-protector-all']
490 # setups fail only on a .c->.o compile and some only at link time
491 if cc.compiles(stack_protector_probe, args: ['-Werror', arg]) and \
492 cc.links(stack_protector_probe, args: ['-Werror', arg])
543 safe_stack_arg = get_option('safe_stack') ? '-fsanitize=safe-stack' : '-fno-sanitize=safe-stack'
557 if cc.has_argument('-fsanitize=address')
558 qemu_cflags = ['-fsanitize=address'] + qemu_cflags
559 qemu_ldflags = ['-fsanitize=address'] + qemu_ldflags
561 error('Your compiler does not support -fsanitize=address')
569 args: [qemu_ldflags, '-fsanitize=undefined'])
570 qemu_cflags += ['-fsanitize=undefined']
571 qemu_ldflags += ['-fsanitize=undefined']
576 if cc.has_argument('-fno-sanitize=function')
577 qemu_cflags += ['-fno-sanitize=function']
580 error('Your compiler does not support -fsanitize=undefined')
591 args: '-fsanitize=thread',
597 # "error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’"
598 # https://gcc.gnu.org/gcc-11/changes.html
600 if cc.has_argument('-Wno-tsan')
601 tsan_warn_suppress = ['-Wno-tsan']
603 qemu_cflags = ['-fsanitize=thread'] + tsan_warn_suppress + qemu_cflags
604 qemu_ldflags = ['-fsanitize=thread'] + qemu_ldflags
608 # The combination is known as "full relro", because .got.plt is read-only too.
609 qemu_ldflags += cc.get_supported_link_arguments('-Wl,-z,relro', '-Wl,-z,now')
612 qemu_ldflags += cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,--nxcompat')
613 qemu_ldflags += cc.get_supported_link_arguments('-Wl,--dynamicbase', '-Wl,--high-entropy-va')
618 # virtual-devices.
619 configure_file(output: 'instrumentation-filter',
620 input: 'scripts/oss-fuzz/instrumentation-filter-template',
624 name: '-fsanitize-coverage-allowlist=/dev/null',
625 args: ['-fsanitize-coverage-allowlist=/dev/null',
626 '-fsanitize-coverage=trace-pc'] )
627 qemu_common_flags += ['-fsanitize-coverage-allowlist=instrumentation-filter']
631 # Add CFLAGS to tell clang to add fuzzer-related instrumentation to all the
632 # compiled code. To build non-fuzzer binaries with --enable-fuzzing, link
633 # everything with fsanitize=fuzzer-no-link. Otherwise, the linker will be
634 # unable to bind the fuzzer-related callbacks added by instrumentation.
635 qemu_common_flags += ['-fsanitize=fuzzer-no-link']
636 qemu_ldflags += ['-fsanitize=fuzzer-no-link']
638 # library. They need to be configurable, to support OSS-Fuzz
639 fuzz_exe_ldflags = ['-fsanitize=fuzzer']
641 # LIB_FUZZING_ENGINE was set; assume we are running on OSS-Fuzz, and
651 error('Selected Control-Flow Integrity but LTO is disabled')
654 error('Selected Control-Flow Integrity is not compatible with modules')
659 if cc.compiles('int main () { return 0; }', name: '-fsanitize=cfi-icall',
660 args: ['-flto', '-fsanitize=cfi-icall'] )
661 cfi_flags += '-fsanitize=cfi-icall'
663 error('-fsanitize=cfi-icall is not supported by the compiler')
666 name: '-fsanitize-cfi-icall-generalize-pointers',
667 args: ['-flto', '-fsanitize=cfi-icall',
668 '-fsanitize-cfi-icall-generalize-pointers'] )
669 cfi_flags += '-fsanitize-cfi-icall-generalize-pointers'
671 error('-fsanitize-cfi-icall-generalize-pointers is not supported by the compiler')
675 name: '-fno-sanitize-trap=cfi-icall',
676 args: ['-flto', '-fsanitize=cfi-icall',
677 '-fno-sanitize-trap=cfi-icall'] )
678 cfi_flags += '-fno-sanitize-trap=cfi-icall'
680 error('-fno-sanitize-trap=cfi-icall is not supported by the compiler')
693 '-ftrivial-auto-var-init=zero',
701 # https://github.com/llvm/llvm-project/issues/75168
704 # https://gitlab.com/qemu-project/qemu/-/issues/2278
707 name: '-fzero-call-used-regs=used-gpr',
708 args: ['-O2', '-fzero-call-used-regs=used-gpr'])
709 hardening_flags += '-fzero-call-used-regs=used-gpr'
720 '-Wempty-body',
721 '-Wendif-labels',
722 '-Wexpansion-to-defined',
723 '-Wformat-security',
724 '-Wformat-y2k',
725 '-Wignored-qualifiers',
726 '-Wimplicit-fallthrough=2',
727 '-Winit-self',
728 '-Wmissing-format-attribute',
729 '-Wmissing-prototypes',
730 '-Wnested-externs',
731 '-Wold-style-declaration',
732 '-Wold-style-definition',
733 '-Wredundant-decls',
734 '-Wshadow=local',
735 '-Wstrict-prototypes',
736 '-Wtype-limits',
737 '-Wundef',
738 '-Wvla',
739 '-Wwrite-strings',
742 '-Wno-gnu-variable-sized-type-not-at-end',
743 '-Wno-initializer-overrides',
744 '-Wno-missing-include-dirs',
745 '-Wno-psabi',
746 '-Wno-shift-negative-value',
747 '-Wno-string-plus-int',
748 '-Wno-tautological-type-limit-compare',
749 '-Wno-typedef-redefinition',
762 ''', args: ['-Wthread-safety', '-Werror'])
764 warn_flags += ['-Wthread-safety']
771 …qemu_cxxflags = ['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS'] + …
781 # Note sanitizer flags are not applied to Objective-C sources!
785 add_project_arguments('-isystem', meson.current_source_dir() / 'linux-headers',
786 '-isystem', 'linux-headers',
790 add_project_arguments('-iquote', '.',
791 '-iquote', meson.current_source_dir(),
792 '-iquote', meson.current_source_dir() / 'include',
795 # If a host-specific include directory exists, list that first...
798 add_project_arguments('-iquote', host_include / host_arch,
802 add_project_arguments('-iquote', host_include / 'generic',
809 'compile_commands.json', sparse.full_path(), '-Wbitwise',
810 '-Wno-transparent-union', '-Wno-old-initializer',
811 '-Wno-non-pointer-null'])
815 # Host-specific libraries and flags #
841 depend_files: files('pc-bios/qemu-nsis.ico'),
861 emulator_link_args = cc.get_supported_link_arguments('-Wl,-z,wxneeded')
866 # Host-specific configuration of accelerators #
875 error('WHPX requires 64-bit host')
903 error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu))
909 warning('It is strongly recommended to remove the --enable-tcg-interpreter')
920 add_project_arguments('-iquote', meson.current_source_dir() / 'tcg' / tcg_arch,
942 method: 'pkg-config')
949 method: 'pkg-config',
952 method: 'pkg-config',
955 method: 'pkg-config',
958 method: 'pkg-config',
961 method: 'pkg-config',
965 method: 'pkg-config')])
990 # Use -D to pick just one of the test programs in scripts/xen-detect.c
993 ('0' + xen_version[1]).substring(-2) + \
994 ('0' + xen_version[2]).substring(-2)
995 if cc.links(files('scripts/xen-detect.c'),
996 args: '-DCONFIG_XEN_CTRL_INTERFACE_VERSION=' + xen_ctrl_version,
1027 glib_pc = dependency('glib-2.0', version: glib_req_ver, required: true,
1028 method: 'pkg-config')
1031 gmodule = dependency('gmodule-export-2.0', version: glib_req_ver, required: true,
1032 method: 'pkg-config')
1034 gmodule = dependency('gmodule-no-export-2.0', version: glib_req_ver, required: true,
1035 method: 'pkg-config')
1040 # This workaround is required due to a bug in pkg-config file for glib as it
1041 # doesn't define GLIB_STATIC_COMPILATION for pkg-config --static
1043 glib_cflags += ['-DGLIB_STATIC_COMPILATION']
1048 # problems on multi-arch where people try to build
1049 # 32-bit QEMU while pointing at 64-bit glib headers
1056 typedef char qemu_build_bug_on[(x)?-1:1] __attribute__((unused));
1064 to the right pkg-config files for your build target.''')
1080 meson.override_dependency('glib-2.0', glib)
1088 gdbus_codegen_error = '@0@ requires gdbus-codegen, please install libgio'
1090 gio = dependency('gio-2.0', required: get_option('gio'),
1091 method: 'pkg-config')
1105 gdbus_codegen = find_program('gdbus-codegen',
1107 gio_unix = dependency('gio-unix-2.0', required: get_option('gio'),
1108 method: 'pkg-config')
1115 gdbus_codegen_error = '@0@ uses gdbus-codegen, which does not support control flow integrity'
1118 xml_pp = find_program('scripts/xml-preprocess.py')
1122 lttng = dependency('lttng-ust', required: true, version: '>= 2.1',
1123 method: 'pkg-config')
1127 pixman = dependency('pixman-1', required: get_option('pixman'), version:'>=0.21.8',
1128 method: 'pkg-config')
1149 method: 'pkg-config')
1159 method: 'pkg-config')
1181 cc.links(libattr_test, dependencies: libattr, args: '-DCONFIG_LIBATTR')
1215 method: 'pkg-config')
1225 libcap_ng = cc.find_library('cap-ng', has_headers: ['cap-ng.h'],
1229 #include <cap-ng.h>
1237 error('could not link libcap-ng')
1239 warning('could not link libcap-ng, disabling')
1247 method: 'pkg-config')
1253 method: 'pkg-config')
1256 # When using a system-wide shared libslirp, the type information for the
1259 # with control-flow integrity.
1262 error('Control-Flow Integrity requires libslirp 4.7.')
1264 warning('Cannot use libslirp since Control-Flow Integrity requires libslirp >= 4.7.')
1295 method: 'pkg-config')
1300 method: 'pkg-config')
1305 method: 'pkg-config')
1309 pipewire = dependency('libpipewire-0.3', version: '>=0.3.60',
1311 method: 'pkg-config')
1316 method: 'pkg-config')
1321 spice_protocol = dependency('spice-protocol', version: '>=0.14.0',
1323 method: 'pkg-config')
1331 spice = dependency('spice-server', version: '>=0.14.0',
1333 method: 'pkg-config')
1343 method: 'pkg-config')
1349 method: 'pkg-config')
1355 method: 'pkg-config')
1361 method: 'pkg-config')
1364 method: 'pkg-config')
1374 method: 'pkg-config')
1382 method: 'pkg-config',
1388 method: 'pkg-config',
1394 method: 'pkg-config',
1400 method: 'pkg-config',
1406 method: 'pkg-config',
1486 method: 'pkg-config')
1488 curses_compile_args = ['-DNCURSES_WIDECHAR=1']
1502 curses_compile_args += ['-I/usr/include/ncursesw']
1523 foreach link_args : [ ['-liconv'], [] ]
1527 # However, without adding glib to the dependencies -L/usr/local/lib will not be
1532 iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
1533 return conv != (iconv_t) -1;
1579 # Some versions of SDL have problems with -Wundef
1584 ''', dependencies: sdl, args: '-Werror=undef')
1585 sdl = declare_dependency(compile_args: '-Wno-undef',
1590 method: 'pkg-config')
1593 error('sdl-image required, but SDL was @0@'.format(
1629 glusterfs = dependency('glusterfs-api', version: '>=3',
1631 method: 'pkg-config')
1679 error('could not enable hv-balloon, update your glib')
1681 warning('could not find glib support for hv-balloon, disabling')
1689 method: 'pkg-config',
1744 dsound = declare_dependency(link_args: ['-lole32', '-ldxguid'])
1762 epoxy = dependency('epoxy', method: 'pkg-config',
1772 gbm = dependency('gbm', method: 'pkg-config', required: false)
1799 method: 'pkg-config',
1806 method: 'pkg-config',
1836 # Debian has removed -lgpg-error from libgcrypt-config
1842 cc.find_library('gpg-error', required: true)],
1870 method: 'pkg-config',
1903 // HMAC-SM3 test
1918 method: 'pkg-config',
1921 # Some versions of capstone have broken pkg-config file
1922 # that reports a wrong -I path, causing the #include to
1934 gmp = dependency('gmp', required: false, method: 'pkg-config')
1937 method: 'pkg-config',
1952 gtk = dependency('gtk+-3.0', version: '>=3.22.0',
1953 method: 'pkg-config',
1956 gtkx11 = dependency('gtk+-x11-3.0', version: '>=3.22.0',
1957 method: 'pkg-config',
1963 vte = dependency('vte-2.91',
1964 method: 'pkg-config',
1974 x11 = dependency('x11', method: 'pkg-config', required: gtkx11.found())
1979 method: 'pkg-config')
1991 method: 'pkg-config')
1996 compile_args: '-DSTRUCT_IOVEC_DEFINED')
2026 snappy = cc.find_library('snappy', has_headers: ['snappy-c.h'],
2030 #include <snappy-c.h>
2117 version: '>=2.5.1', method: 'pkg-config')
2121 u2f = dependency('u2f-emu', required: get_option('u2f'),
2122 method: 'pkg-config')
2126 canokey = dependency('canokey-qemu', required: get_option('canokey'),
2127 method: 'pkg-config')
2131 usbredir = dependency('libusbredirparser-0.5', required: get_option('usb_redir'),
2132 version: '>=0.6', method: 'pkg-config')
2136 libusb = dependency('libusb-1.0', required: get_option('libusb'),
2137 version: '>=1.0.13', method: 'pkg-config')
2143 method: 'pkg-config')
2148 version: '>=57', method: 'pkg-config')
2154 method: 'pkg-config')
2159 method: 'pkg-config')
2167 method: 'pkg-config')
2184 error('malloc_trim not available with non-libc memory allocator')
2199 * function availability on recentish Mingw-w64 platforms. */
2210 error_message: 'vhost_user_blk_server requires vhost-user support') \
2215 error('Cannot enable fuse-lseek while fuse is disabled')
2219 version: '>=3.1', method: 'pkg-config')
2228 error('fuse-lseek requires libfuse >=3.8, found ' + fuse.version())
2230 error('fuse-lseek requires libfuse, which was not found')
2257 …ependency('libbpf', version: '>=' + bpf_version, required: get_option('bpf'), method: 'pkg-config')
2281 version: '>=1.4.0', method: 'pkg-config')
2294 method: 'pkg-config',
2299 # config-host.h #
2351 error_message: '-display dbus requires glib>=2.64') \
2353 error_message: gdbus_codegen_error.format('-display dbus')) \
2358 error_message: 'virtio-9p (virtfs) requires Linux or macOS') \
2360 … error_message: 'virtio-9p (virtfs) on macOS requires the presence of pthread_fchdir_np') \
2362 error_message: 'virtio-9p (virtfs) on Linux requires libattr-devel') \
2421 meson.current_source_dir() / 'scripts/qemu-stamp.py',
2422 meson.project_version(), get_option('pkgversion'), '--',
2447 error('Cannot enable module-upgrades as modules are not enabled')
2590 ('0' + xen_version[1]).substring(-2) + \
2591 ('0' + xen_version[2]).substring(-2)
2604 message('Disabling coroutine pool to measure stack usage')
2679 args: '-fsanitize=address',
2692 # libinotify-kqueue
2780 # missing-prototype case, we try again with a definitely-bogus prototype.
2802 # i.e. errno is set and -1 is returned. That's not really how POSIX defines the
2872 int main(void) { return signalfd(-1, NULL, SFD_CLOEXEC); }'''))
2937 }''', args: ['-Werror']))
2939 # See if 64-bit atomic operations are supported.
2973 # "do we have 128-bit atomics which are handled inline and specifically not
2976 # We only care about these operations on 16-byte aligned pointers, so
2977 # force 16-byte alignment of the pointer, which may be greater than
2981 __uint128_t *p = __builtin_assume_aligned(av[ac - 1], 16);
3086 int main(int argc, char *argv[]) { return bar(argv[argc - 1]); }
3188 error('mingw must provide setjmp/longjmp for windows-arm64')
3257 config_target = { 'TARGET_NAME': target.split('-')[0] }
3258 if target.endswith('linux-user')
3266 elif target.endswith('bsd-user')
3278 if target.endswith('-user')
3291 # Disallow 64-bit on 32-bit emulation and virtualization
3346 # Note that TARGET_BASE_ARCH ends up in config-target.h but it is
3361 config_target_h += {target: configure_file(output: target + '-config-target.h',
3364 if target.endswith('-softmmu')
3368 # PVG is not cross-architecture. Use accelerator_targets as a proxy to
3375 config_devices_mak = target + '-config-devices.mak'
3382 get_option('default_devices') ? '--defconfig' : '--allnoconfig',
3392 config_devices_h += {target: configure_file(output: target + '-config-devices.h',
3406 genh += custom_target('config-poison.h',
3408 output: 'config-poison.h',
3410 command: [find_program('scripts/make-config-poison.sh'),
3423 libvfio_user_proj = subproject('libvfio-user', required: true)
3429 libvhost_user = subproject('libvhost-user')
3443 config_host_h = configure_file(output: 'config-host.h', configuration: config_host_data)
3448 qapi_gen = find_program('scripts/qapi-gen.py')
3464 meson.current_source_dir() / 'scripts/qapi-gen.py'
3469 '--backend=' + ','.join(get_option('trace_backends'))
3491 qemu_version_cmd = [find_program('scripts/qemu-version.sh'),
3494 qemu_version = custom_target('qemu-version.h',
3495 output: 'qemu-version.h',
3504 ['qemu-options.hx', 'qemu-options.def'],
3505 ['qemu-img-cmds.hx', 'qemu-img-cmds.h'],
3509 ['hmp-commands.hx', 'hmp-commands.h'],
3510 ['hmp-commands-info.hx', 'hmp-commands-info.h'],
3518 command: [hxtool, '-h', '@INPUT0@'])
3537 trace_events_subdirs += [ 'linux-user' ]
3540 trace_events_subdirs += [ 'bsd-user' ]
3571 'hw/i2c',
3590 'hw/pci-host',
3692 …libmodulecommon = static_library('module-common', files('module-common.c') + genh, pic: true, c_ar…
3693 …ndency(objects: libmodulecommon.extract_all_objects(recursive: false), compile_args: '-DBUILD_DSO')
3703 event_loop_base = files('event-loop-base.c')
3704 event_loop_base = static_library('event-loop-base',
3728 output: 'decode-@BASENAME@.c.inc',
3729 arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTPUT@'])
3745 'qemu-io-cmds.c',
3757 'blockdev-nbd.c',
3759 'job-qmp.c',
3762 # os-posix.c contains POSIX-specific functions used by qemu-storage-daemon,
3763 # os-win32.c does not
3765 system_ss.add(files('os-win32.c'))
3767 blockdev_ss.add(files('os-posix.c'))
3771 common_ss.add(files('cpu-common.c'))
3772 specific_ss.add(files('cpu-target.c'))
3777 # through an alias:
3780 # impossible, as the alias is restricted to page-vary-common.c. Indeed,
3781 # without lto, not even the alias is required -- we simply use different
3783 pagevary = files('page-vary-common.c')
3785 pagevary_flags = ['-fno-lto']
3787 pagevary_flags += '-fno-sanitize=cfi-icall'
3789 pagevary = static_library('page-vary-common', sources: pagevary + genh,
3794 specific_ss.add(files('page-target.c', 'page-vary-target.c'))
3816 subdir('common-user')
3817 subdir('bsd-user')
3818 subdir('linux-user')
3831 modinfo_collect = find_program('scripts/modinfo-collect.py')
3832 modinfo_generate = find_program('scripts/modinfo-generate.py')
3847 sl = static_library(d + '-' + m, [genh, module_ss.sources()],
3866 modinfo_files += custom_target(d + '-' + m + '.modinfo',
3867 output: d + '-' + m + '.modinfo',
3887 if target.endswith('-softmmu')
3890 c_args = ['-DCOMPILING_PER_TARGET',
3891 '-DCONFIG_TARGET="@0@-config-target.h"'.format(target),
3892 '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)]
3895 module_name = d + '-' + m + '-' + config_target['TARGET_NAME']
3914 … command: [modinfo_collect, '--target', target, target_module_ss.sources()])
3926 if target.endswith('-softmmu')
3928 config_devices_mak = target + '-config-devices.mak'
3929 modinfo_src = custom_target('modinfo-' + target + '.c',
3930 output: 'modinfo-' + target + '.c',
3932 … command: [modinfo_generate, '--devices', config_devices_mak, '@INPUT@'],
3935 modinfo_lib = static_library('modinfo-' + target + '.c', modinfo_src)
4048 # We would like to use --generate-cstr, but it is only available
4050 # is 0.60.x (Debian 12 has 0.60.1) which introduces --allowlist-file.
4052 '--disable-header-comment',
4053 '--raw-line', '// @generated',
4054 '--ctypes-prefix', 'std::os::raw',
4055 '--generate-block',
4056 '--impl-debug',
4057 '--no-doc-comments',
4058 '--with-derive-default',
4059 '--no-layout-tests',
4060 '--no-prepend-enum-name',
4061 '--allowlist-file', meson.project_source_root() + '/include/.*',
4062 '--allowlist-file', meson.project_source_root() + '/.*',
4063 '--allowlist-file', meson.project_build_root() + '/.*'
4067 bindgen_args += ['--no-rustfmt-bindings']
4069 bindgen_args += ['--formatter', 'none']
4073 bindgen_args += ['--rust-target', '1.59']
4077 bindgen_args += ['--size_t-is-usize']
4079 bindgen_args += ['--merge-extern-blocks']
4095 bindgen_args += ['--rustified-enum', enum]
4102 bindgen_args += ['--bitfield-enum', enum]
4139 c_args = ['-DCOMPILING_PER_TARGET',
4140 '-DCONFIG_TARGET="@0@-config-target.h"'.format(target),
4146 target_inc += include_directories('linux-headers', is_system: true)
4148 if target.endswith('-softmmu')
4161 c_args += ['-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)]
4174 base_dir = 'linux-user'
4177 base_dir = 'bsd-user'
4178 target_inc += include_directories('bsd-user/' / host_os)
4179 target_inc += include_directories('bsd-user/host/' / host_arch)
4199 gdbstub_xml = custom_target(target + '-gdbstub-xml.c',
4200 output: target + '-gdbstub-xml.c',
4249 lib = static_library('qemu-' + target,
4257 if target.endswith('-softmmu')
4259 'name': 'qemu-system-' + target_name,
4266 'name': 'qemu-system-' + target_name + 'w',
4275 'name': 'qemu-fuzz-' + target_name,
4283 'name': 'qemu-' + target_name,
4292 exe_name += '-unsigned'
4305 icon = 'pc-bios/qemu.rsrc'
4323 meson.add_install_script(entitlement, '--install',
4332 'probe-prefix': 'qemu.' + target_type + '.' + target_name,
4341 install_headers('include/qemu/qemu-plugin.h')
4351 # Don't build qemu-keymap if xkbcommon is not explicitly enabled
4354 # used for the update-keymaps target, so include rules even if !have_tools
4355 qemu_keymap = executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c') + genh,
4360 qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep],
4363 qemu_io = executable('qemu-io', files('qemu-io.c'),
4366 qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
4371 subdir('storage-daemon')
4373 foreach exe: [ 'qemu-img', 'qemu-io', 'qemu-nbd', 'qemu-storage-daemon']
4376 'probe-prefix': 'qemu.' + exe.substring(5).replace('-', '_')
4382 executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'),
4387 subdir('contrib/vhost-user-blk')
4388 subdir('contrib/vhost-user-gpu')
4389 subdir('contrib/vhost-user-input')
4390 subdir('contrib/vhost-user-scsi')
4394 executable('qemu-bridge-helper', files('qemu-bridge-helper.c'),
4399 executable('qemu-pr-helper', files('scsi/qemu-pr-helper.c', 'scsi/utils.c'),
4405 executable('qemu-vmsr-helper', files('tools/i386/qemu-vmsr-helper.c'),
4413 subdir('contrib/ivshmem-client')
4414 subdir('contrib/ivshmem-server')
4421 …{'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_dir() / t['exe'], 'install': false…
4423 {'ext': '-simpletrace.stp', 'fmt': 'simpletrace-stap', 'bin': '', 'install': true},
4424 {'ext': '-log.stp', 'fmt': 'log-stap', 'bin': '', 'install': true},
4427 tracetool, '--group=all', '--format=' + stp['fmt'],
4428 '--binary=' + stp['bin'],
4429 '--probe-prefix=' + t['probe-prefix'],
4446 subdir('pc-bios')
4461 '--',
4462 '-DDISPLAYVERSION=' + meson.project_version(),
4465 nsis_cmd += '-DCONFIG_DOCUMENTATION=y'
4468 nsis_cmd += '-DCONFIG_GTK=y'
4472 output: 'qemu-setup-' + meson.project_version() + '.exe',
4513 summary_info += {'sphinx-build': sphinx_build}
4535 summary_info += {'system-mode emulation': have_system}
4536 summary_info += {'user-mode emulation': have_user}
4549 summary_info += {'Trace output file': get_option('trace_file') + '-<pid>'}
4551 summary_info += {'D-Bus display': dbus_display}
4554 summary_info += {'vhost-kernel support': have_vhost_kernel}
4555 summary_info += {'vhost-net support': have_vhost_net}
4556 summary_info += {'vhost-user support': have_vhost_user}
4557 summary_info += {'vhost-user-crypto support': have_vhost_user_crypto}
4558 summary_info += {'vhost-user-blk server support': have_vhost_user_blk_server}
4559 summary_info += {'vhost-vdpa support': have_vhost_vdpa}
4575 summary_info += {'Objective-C compiler': ' '.join(meson.get_compiler('objc').cmd_array())}
4577 summary_info += {'Objective-C compiler': false}
4587 option_cflags = (get_option('debug') ? ['-g'] : [])
4589 option_cflags += ['-O' + get_option('optimization')]
4610 summary_info += {'link-time optimization (LTO)': get_option('b_lto')}
4632 # snarf the cross-compilation information for tests
4636 tcg_mak = meson.current_build_dir() / 'tests/tcg' / target / 'config-target.mak'
4679 summary_info += {'vfio-user server': vfio_user_server_allowed}
4686 summary_info += {'coroutine pool': have_coroutine_pool}
4724 summary_info += {'rng-none': get_option('rng_none')}
4802 summary_info += {'libcap-ng support': libcap_ng}
4820 summary_info += {'hv-balloon support': hv_balloon}
4842 summary_info += {'libinotify-kqueue': inotify}
4867 message('Support for 32-bit CPU host architecture ' + cpu + ' is going')
4887 message('contact the developers at qemu-devel@nongnu.org.')
4905 message('Use --disable-relocatable to remove this warning.')