]> Git Repo - qemu.git/blame - meson.build
meson: infrastructure for building emulators
[qemu.git] / meson.build
CommitLineData
a5665051
PB
1project('qemu', ['c'], meson_version: '>=0.55.0',
2 default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_lundef=false'],
3 version: run_command('head', meson.source_root() / 'VERSION').stdout().strip())
4
5not_found = dependency('', required: false)
6keyval = import('unstable-keyval')
a81df1b6
PB
7ss = import('sourceset')
8
ce1c1e7a 9sh = find_program('sh')
a81df1b6 10cc = meson.get_compiler('c')
a5665051 11config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
2becc36a 12config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak')
a5665051
PB
13
14add_project_arguments(config_host['QEMU_CFLAGS'].split(),
15 native: false, language: ['c', 'objc'])
16add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
17 native: false, language: 'cpp')
18add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
19 native: false, language: ['c', 'cpp', 'objc'])
20add_project_arguments(config_host['QEMU_INCLUDES'].split(),
21 language: ['c', 'cpp', 'objc'])
22
fc929892
MAL
23python = import('python').find_installation()
24
25link_language = meson.get_external_property('link_language', 'cpp')
26if link_language == 'cpp'
27 add_languages('cpp', required: true, native: false)
28endif
a5665051
PB
29if host_machine.system() == 'darwin'
30 add_languages('objc', required: false, native: false)
31endif
32
968b4db3
PB
33if 'SPARSE_CFLAGS' in config_host
34 run_target('sparse',
35 command: [find_program('scripts/check_sparse.py'),
36 config_host['SPARSE_CFLAGS'].split(),
37 'compile_commands.json'])
38endif
39
a5665051
PB
40configure_file(input: files('scripts/ninjatool.py'),
41 output: 'ninjatool',
42 configuration: config_host)
f9332757
PB
43
44supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux']
45supported_cpus = ['ppc', 'ppc64', 's390x', 'sparc64', 'riscv32', 'riscv64', 'x86', 'x86_64',
46 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64']
47
48cpu = host_machine.cpu_family()
49targetos = host_machine.system()
50
a81df1b6
PB
51m = cc.find_library('m', required: false)
52util = cc.find_library('util', required: false)
53socket = []
04c6f1e7 54version_res = []
d92989aa
MAL
55coref = []
56iokit = []
57cocoa = []
58hvf = []
a81df1b6
PB
59if targetos == 'windows'
60 socket = cc.find_library('ws2_32')
04c6f1e7
MAL
61
62 win = import('windows')
63 version_res = win.compile_resources('version.rc',
64 depend_files: files('pc-bios/qemu-nsis.ico'),
65 include_directories: include_directories('.'))
d92989aa
MAL
66elif targetos == 'darwin'
67 coref = dependency('appleframeworks', modules: 'CoreFoundation')
68 iokit = dependency('appleframeworks', modules: 'IOKit')
69 cocoa = dependency('appleframeworks', modules: 'Cocoa')
70 hvf = dependency('appleframeworks', modules: 'Hypervisor')
cfad62f1
PB
71elif targetos == 'sunos'
72 socket = [cc.find_library('socket'),
73 cc.find_library('nsl'),
74 cc.find_library('resolv')]
75elif targetos == 'haiku'
76 socket = [cc.find_library('posix_error_mapper'),
77 cc.find_library('network'),
78 cc.find_library('bsd')]
a81df1b6
PB
79endif
80glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(),
81 link_args: config_host['GLIB_LIBS'].split())
82gio = not_found
83if 'CONFIG_GIO' in config_host
84 gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(),
85 link_args: config_host['GIO_LIBS'].split())
86endif
87lttng = not_found
88if 'CONFIG_TRACE_UST' in config_host
89 lttng = declare_dependency(link_args: config_host['LTTNG_UST_LIBS'].split())
90endif
91urcubp = not_found
92if 'CONFIG_TRACE_UST' in config_host
93 urcubp = declare_dependency(link_args: config_host['URCU_BP_LIBS'].split())
94endif
95nettle = not_found
96if 'CONFIG_NETTLE' in config_host
97 nettle = declare_dependency(compile_args: config_host['NETTLE_CFLAGS'].split(),
98 link_args: config_host['NETTLE_LIBS'].split())
99endif
100gnutls = not_found
101if 'CONFIG_GNUTLS' in config_host
102 gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(),
103 link_args: config_host['GNUTLS_LIBS'].split())
104endif
ea458960
MAL
105pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
106 link_args: config_host['PIXMAN_LIBS'].split())
5e7fbd25
MAL
107pam = not_found
108if 'CONFIG_AUTH_PAM' in config_host
109 pam = cc.find_library('pam')
110endif
ec0d5893
MAL
111libattr = not_found
112if 'CONFIG_ATTR' in config_host
113 libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split())
114endif
3f99cf57
PB
115seccomp = not_found
116if 'CONFIG_SECCOMP' in config_host
117 seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(),
118 link_args: config_host['SECCOMP_LIBS'].split())
119endif
120libcap_ng = not_found
121if 'CONFIG_LIBCAP_NG' in config_host
122 libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
123endif
ade60d4f
MAL
124xkbcommon = not_found
125if 'CONFIG_XKBCOMMON' in config_host
126 xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(),
127 link_args: config_host['XKBCOMMON_LIBS'].split())
128endif
5ee24e78 129rt = cc.find_library('rt', required: false)
99650b62
PB
130libiscsi = not_found
131if 'CONFIG_LIBISCSI' in config_host
132 libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),
133 link_args: config_host['LIBISCSI_LIBS'].split())
134endif
ea458960
MAL
135gbm = not_found
136if 'CONFIG_GBM' in config_host
137 gbm = declare_dependency(compile_args: config_host['GBM_CFLAGS'].split(),
138 link_args: config_host['GBM_LIBS'].split())
139endif
140virgl = not_found
141if 'CONFIG_VIRGL' in config_host
142 virgl = declare_dependency(compile_args: config_host['VIRGL_CFLAGS'].split(),
143 link_args: config_host['VIRGL_LIBS'].split())
144endif
1d7bb6ab
MAL
145curl = not_found
146if 'CONFIG_CURL' in config_host
147 curl = declare_dependency(compile_args: config_host['CURL_CFLAGS'].split(),
148 link_args: config_host['CURL_LIBS'].split())
149endif
f15bff25
PB
150libudev = not_found
151if 'CONFIG_LIBUDEV' in config_host
152 libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split())
153endif
a81df1b6 154
2becc36a
PB
155create_config = find_program('scripts/create_config')
156minikconf = find_program('scripts/minikconf.py')
a81df1b6
PB
157target_dirs = config_host['TARGET_DIRS'].split()
158have_user = false
159have_system = false
2becc36a
PB
160config_devices_mak_list = []
161config_devices_h = {}
162config_target_mak = {}
163kconfig_external_symbols = [
164 'CONFIG_KVM',
165 'CONFIG_XEN',
166 'CONFIG_TPM',
167 'CONFIG_SPICE',
168 'CONFIG_IVSHMEM',
169 'CONFIG_OPENGL',
170 'CONFIG_X11',
171 'CONFIG_VHOST_USER',
172 'CONFIG_VHOST_KERNEL',
173 'CONFIG_VIRTFS',
174 'CONFIG_LINUX',
175 'CONFIG_PVRDMA',
176]
a81df1b6
PB
177foreach target : target_dirs
178 have_user = have_user or target.endswith('-user')
2becc36a
PB
179 config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak') + config_host
180
181 if target.endswith('-softmmu')
182 have_system = true
183
184 base_kconfig = []
185 foreach sym : kconfig_external_symbols
186 if sym in config_target
187 base_kconfig += '@0@=y'.format(sym)
188 endif
189 endforeach
190
191 config_devices_mak = target + '-config-devices.mak'
192 config_devices_mak = configure_file(
193 input: ['default-configs' / target + '.mak', 'Kconfig'],
194 output: config_devices_mak,
195 depfile: config_devices_mak + '.d',
196 capture: true,
197 command: [minikconf, config_host['CONFIG_MINIKCONF_MODE'],
198 config_devices_mak, '@DEPFILE@', '@INPUT@',
199 base_kconfig])
200 config_devices_h += {target: custom_target(
201 target + '-config-devices.h',
202 input: config_devices_mak,
203 output: target + '-config-devices.h',
204 capture: true,
205 command: [create_config, '@INPUT@'])}
206 config_devices_mak_list += config_devices_mak
207 config_target += keyval.load(config_devices_mak)
208 endif
209 config_target_mak += {target: config_target}
a81df1b6
PB
210endforeach
211have_tools = 'CONFIG_TOOLS' in config_host
212have_block = have_system or have_tools
213
2becc36a
PB
214grepy = find_program('scripts/grepy.sh')
215# This configuration is used to build files that are shared by
216# multiple binaries, and then extracted out of the "common"
217# static_library target.
218#
219# We do not use all_sources()/all_dependencies(), because it would
220# build literally all source files, including devices only used by
221# targets that are not built for this compilation. The CONFIG_ALL
222# pseudo symbol replaces it.
223
224if have_system
225 config_all_devices_mak = configure_file(
226 output: 'config-all-devices.mak',
227 input: config_devices_mak_list,
228 capture: true,
229 command: [grepy, '@INPUT@'],
230 )
231 config_all_devices = keyval.load(config_all_devices_mak)
232else
233 config_all_devices = {}
234endif
235config_all = config_all_devices
236config_all += config_host
237config_all += config_all_disas
238config_all += {
239 'CONFIG_XEN': config_host.has_key('CONFIG_XEN_BACKEND'),
240 'CONFIG_SOFTMMU': have_system,
241 'CONFIG_USER_ONLY': have_user,
242 'CONFIG_ALL': true,
243}
244
a81df1b6
PB
245# Generators
246
2c273f32 247genh = []
3f885659 248hxtool = find_program('scripts/hxtool')
650b5d54 249shaderinclude = find_program('scripts/shaderinclude.pl')
a81df1b6
PB
250qapi_gen = find_program('scripts/qapi-gen.py')
251qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py',
252 meson.source_root() / 'scripts/qapi/commands.py',
253 meson.source_root() / 'scripts/qapi/common.py',
254 meson.source_root() / 'scripts/qapi/doc.py',
255 meson.source_root() / 'scripts/qapi/error.py',
256 meson.source_root() / 'scripts/qapi/events.py',
257 meson.source_root() / 'scripts/qapi/expr.py',
258 meson.source_root() / 'scripts/qapi/gen.py',
259 meson.source_root() / 'scripts/qapi/introspect.py',
260 meson.source_root() / 'scripts/qapi/parser.py',
261 meson.source_root() / 'scripts/qapi/schema.py',
262 meson.source_root() / 'scripts/qapi/source.py',
263 meson.source_root() / 'scripts/qapi/types.py',
264 meson.source_root() / 'scripts/qapi/visit.py',
265 meson.source_root() / 'scripts/qapi/common.py',
266 meson.source_root() / 'scripts/qapi/doc.py',
267 meson.source_root() / 'scripts/qapi-gen.py'
268]
269
270tracetool = [
271 python, files('scripts/tracetool.py'),
272 '--backend=' + config_host['TRACE_BACKENDS']
273]
274
2c273f32
MAL
275qemu_version_cmd = [find_program('scripts/qemu-version.sh'),
276 meson.current_source_dir(),
277 config_host['PKGVERSION'], config_host['VERSION']]
278qemu_version = custom_target('qemu-version.h',
279 output: 'qemu-version.h',
280 command: qemu_version_cmd,
281 capture: true,
282 build_by_default: true,
283 build_always_stale: true)
284genh += qemu_version
285
2becc36a
PB
286config_host_h = custom_target('config-host.h',
287 input: meson.current_build_dir() / 'config-host.mak',
288 output: 'config-host.h',
289 capture: true,
290 command: [create_config, '@INPUT@'])
291genh += config_host_h
292
3f885659
MAL
293hxdep = []
294hx_headers = [
295 ['qemu-options.hx', 'qemu-options.def'],
296 ['qemu-img-cmds.hx', 'qemu-img-cmds.h'],
297]
298if have_system
299 hx_headers += [
300 ['hmp-commands.hx', 'hmp-commands.h'],
301 ['hmp-commands-info.hx', 'hmp-commands-info.h'],
302 ]
303endif
304foreach d : hx_headers
305 custom_target(d[1],
306 input: files(d[0]),
307 output: d[1],
308 capture: true,
309 build_by_default: true, # to be removed when added to a target
310 command: [hxtool, '-h', '@INPUT0@'])
311endforeach
312genh += hxdep
313
a81df1b6
PB
314# Collect sourcesets.
315
316util_ss = ss.source_set()
317stub_ss = ss.source_set()
318trace_ss = ss.source_set()
2becc36a
PB
319common_ss = ss.source_set()
320softmmu_ss = ss.source_set()
321user_ss = ss.source_set()
322bsd_user_ss = ss.source_set()
323linux_user_ss = ss.source_set()
324specific_ss = ss.source_set()
325
326hw_arch = {}
327target_arch = {}
328target_softmmu_arch = {}
a81df1b6
PB
329
330###############
331# Trace files #
332###############
333
334trace_events_subdirs = [
335 'accel/kvm',
336 'accel/tcg',
337 'crypto',
338 'monitor',
339]
340if have_user
341 trace_events_subdirs += [ 'linux-user' ]
342endif
343if have_block
344 trace_events_subdirs += [
345 'authz',
346 'block',
347 'io',
348 'nbd',
349 'scsi',
350 ]
351endif
352if have_system
353 trace_events_subdirs += [
354 'audio',
355 'backends',
356 'backends/tpm',
357 'chardev',
358 'hw/9pfs',
359 'hw/acpi',
360 'hw/alpha',
361 'hw/arm',
362 'hw/audio',
363 'hw/block',
364 'hw/block/dataplane',
365 'hw/char',
366 'hw/display',
367 'hw/dma',
368 'hw/hppa',
369 'hw/hyperv',
370 'hw/i2c',
371 'hw/i386',
372 'hw/i386/xen',
373 'hw/ide',
374 'hw/input',
375 'hw/intc',
376 'hw/isa',
377 'hw/mem',
378 'hw/mips',
379 'hw/misc',
380 'hw/misc/macio',
381 'hw/net',
382 'hw/nvram',
383 'hw/pci',
384 'hw/pci-host',
385 'hw/ppc',
386 'hw/rdma',
387 'hw/rdma/vmw',
388 'hw/rtc',
389 'hw/s390x',
390 'hw/scsi',
391 'hw/sd',
392 'hw/sparc',
393 'hw/sparc64',
394 'hw/ssi',
395 'hw/timer',
396 'hw/tpm',
397 'hw/usb',
398 'hw/vfio',
399 'hw/virtio',
400 'hw/watchdog',
401 'hw/xen',
402 'hw/gpio',
403 'hw/riscv',
404 'migration',
405 'net',
406 'ui',
407 ]
408endif
409trace_events_subdirs += [
410 'hw/core',
411 'qapi',
412 'qom',
413 'target/arm',
414 'target/hppa',
415 'target/i386',
416 'target/mips',
417 'target/ppc',
418 'target/riscv',
419 'target/s390x',
420 'target/sparc',
421 'util',
422]
423
a81df1b6
PB
424subdir('qapi')
425subdir('qobject')
426subdir('stubs')
427subdir('trace')
428subdir('util')
5582c58f
MAL
429subdir('qom')
430subdir('authz')
a81df1b6
PB
431subdir('crypto')
432subdir('storage-daemon')
2d78b56e 433subdir('ui')
a81df1b6
PB
434
435# Build targets from sourcesets
436
2becc36a 437stub_ss = stub_ss.apply(config_all, strict: false)
a81df1b6
PB
438
439util_ss.add_all(trace_ss)
2becc36a 440util_ss = util_ss.apply(config_all, strict: false)
a81df1b6
PB
441libqemuutil = static_library('qemuutil',
442 sources: util_ss.sources() + stub_ss.sources() + genh,
443 dependencies: [util_ss.dependencies(), m, glib, socket])
444qemuutil = declare_dependency(link_with: libqemuutil,
04c6f1e7 445 sources: genh + version_res)
a81df1b6 446
7fcfd456 447subdir('io')
ec0d5893 448subdir('fsdev')
d3b18480 449subdir('target')
ec0d5893 450
2becc36a
PB
451common_ss.add_all(when: 'CONFIG_SOFTMMU', if_true: softmmu_ss)
452common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss)
453
454common_all = common_ss.apply(config_all, strict: false)
455common_all = static_library('common',
456 build_by_default: false,
457 sources: common_all.sources() + genh,
458 dependencies: common_all.dependencies(),
459 name_suffix: 'fa')
460
461foreach target : target_dirs
462 config_target = config_target_mak[target]
463 target_name = config_target['TARGET_NAME']
464 arch = config_target['TARGET_BASE_ARCH']
465 arch_srcs = []
466
467 target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])]
468 if targetos == 'linux'
469 target_inc += include_directories('linux-headers', is_system: true)
470 endif
471 if target.endswith('-softmmu')
472 qemu_target_name = 'qemu-system-' + target_name
473 target_type='system'
474 arch_srcs += config_devices_h[target]
475 else
476 target_type='user'
477 qemu_target_name = 'qemu-' + target_name
478 if 'CONFIG_LINUX_USER' in config_target
479 base_dir = 'linux-user'
480 target_inc += include_directories('linux-user/host/' / config_host['ARCH'])
481 else
482 base_dir = 'bsd-user'
483 endif
484 target_inc += include_directories(
485 base_dir,
486 base_dir / config_target['TARGET_ABI_DIR'],
487 )
488 endif
489
490 target_common = common_ss.apply(config_target, strict: false)
491 objects = common_all.extract_objects(target_common.sources())
492
493 # TODO: Change to generator once obj-y goes away
494 config_target_h = custom_target(target + '-config-target.h',
495 input: meson.current_build_dir() / target / 'config-target.mak',
496 output: target + '-config-target.h',
497 capture: true,
498 command: [create_config, '@INPUT@'])
499
500 target_specific = specific_ss.apply(config_target, strict: false)
501 arch_srcs += target_specific.sources()
502
503 static_library('qemu-' + target,
504 sources: arch_srcs + [config_target_h] + genh,
505 objects: objects,
506 include_directories: target_inc,
507 c_args: ['-DNEED_CPU_H',
508 '-DCONFIG_TARGET="@[email protected]"'.format(target),
509 '-DCONFIG_DEVICES="@[email protected]"'.format(target)],
510 name_suffix: 'fa')
511endforeach
512
931049b4 513# Other build targets
f15bff25
PB
514if 'CONFIG_GUEST_AGENT' in config_host
515 subdir('qga')
516endif
517
931049b4 518if have_tools
a9c9727c 519 subdir('contrib/rdmacm-mux')
1d7bb6ab 520 subdir('contrib/elf2dmp')
a9c9727c 521
ade60d4f
MAL
522 if 'CONFIG_XKBCOMMON' in config_host
523 executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c'),
524 dependencies: [qemuutil, xkbcommon], install: true)
525 endif
526
157e7b13
MAL
527 executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'),
528 dependencies: qemuutil,
529 install: true)
530
931049b4
PB
531 if 'CONFIG_VHOST_USER' in config_host
532 subdir('contrib/libvhost-user')
2d7ac0af 533 subdir('contrib/vhost-user-blk')
ea458960
MAL
534 if 'CONFIG_LINUX' in config_host
535 subdir('contrib/vhost-user-gpu')
536 endif
32fcc624 537 subdir('contrib/vhost-user-input')
99650b62 538 subdir('contrib/vhost-user-scsi')
931049b4 539 endif
8f51e01c
MAL
540
541 if targetos == 'linux'
542 executable('qemu-bridge-helper', files('qemu-bridge-helper.c'),
543 dependencies: [qemuutil, libcap_ng],
544 install: true,
545 install_dir: get_option('libexecdir'))
546 endif
547
5ee24e78
MAL
548 if 'CONFIG_IVSHMEM' in config_host
549 subdir('contrib/ivshmem-client')
550 subdir('contrib/ivshmem-server')
551 endif
931049b4
PB
552endif
553
3f99cf57 554subdir('tools')
bdcbea7a 555subdir('pc-bios')
ce1c1e7a 556subdir('tests')
3f99cf57 557
f9332757
PB
558summary_info = {}
559summary_info += {'Install prefix': config_host['prefix']}
560summary_info += {'BIOS directory': config_host['qemu_datadir']}
561summary_info += {'firmware path': config_host['qemu_firmwarepath']}
562summary_info += {'binary directory': config_host['bindir']}
563summary_info += {'library directory': config_host['libdir']}
564summary_info += {'module directory': config_host['qemu_moddir']}
565summary_info += {'libexec directory': config_host['libexecdir']}
566summary_info += {'include directory': config_host['includedir']}
567summary_info += {'config directory': config_host['sysconfdir']}
568if targetos != 'windows'
569 summary_info += {'local state directory': config_host['qemu_localstatedir']}
570 summary_info += {'Manual directory': config_host['mandir']}
571else
572 summary_info += {'local state directory': 'queried at runtime'}
573endif
574summary_info += {'Build directory': meson.current_build_dir()}
575summary_info += {'Source path': meson.current_source_dir()}
576summary_info += {'GIT binary': config_host['GIT']}
577summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']}
578summary_info += {'C compiler': meson.get_compiler('c').cmd_array()[0]}
579summary_info += {'Host C compiler': meson.get_compiler('c', native: true).cmd_array()[0]}
580if link_language == 'cpp'
581 summary_info += {'C++ compiler': meson.get_compiler('cpp').cmd_array()[0]}
582else
583 summary_info += {'C++ compiler': false}
584endif
585if targetos == 'darwin'
586 summary_info += {'Objective-C compiler': meson.get_compiler('objc').cmd_array()[0]}
587endif
588summary_info += {'ARFLAGS': config_host['ARFLAGS']}
589summary_info += {'CFLAGS': config_host['CFLAGS']}
590summary_info += {'QEMU_CFLAGS': config_host['QEMU_CFLAGS']}
591summary_info += {'QEMU_LDFLAGS': config_host['QEMU_LDFLAGS']}
592summary_info += {'make': config_host['MAKE']}
593summary_info += {'install': config_host['INSTALL']}
594summary_info += {'python': '@0@ (version: @1@)'.format(python.full_path(), python.language_version())}
595summary_info += {'sphinx-build': config_host['SPHINX_BUILD']}
596summary_info += {'genisoimage': config_host['GENISOIMAGE']}
597# TODO: add back version
598summary_info += {'slirp support': config_host.has_key('CONFIG_SLIRP')}
599if config_host.has_key('CONFIG_SLIRP')
600 summary_info += {'smbd': config_host['CONFIG_SMBD_COMMAND']}
601endif
602summary_info += {'module support': config_host.has_key('CONFIG_MODULES')}
603if config_host.has_key('CONFIG_MODULES')
604 summary_info += {'alternative module path': config_host.has_key('CONFIG_MODULE_UPGRADES')}
605endif
606summary_info += {'host CPU': cpu}
607summary_info += {'host endianness': build_machine.endian()}
608summary_info += {'target list': config_host['TARGET_DIRS']}
609summary_info += {'gprof enabled': config_host.has_key('CONFIG_GPROF')}
610summary_info += {'sparse enabled': meson.get_compiler('c').cmd_array().contains('cgcc')}
611summary_info += {'strip binaries': get_option('strip')}
612summary_info += {'profiler': config_host.has_key('CONFIG_PROFILER')}
613summary_info += {'static build': config_host.has_key('CONFIG_TOOLS')}
614if targetos == 'darwin'
615 summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')}
616endif
617# TODO: add back version
618summary_info += {'SDL support': config_host.has_key('CONFIG_SDL')}
619summary_info += {'SDL image support': config_host.has_key('CONFIG_SDL_IMAGE')}
620# TODO: add back version
621summary_info += {'GTK support': config_host.has_key('CONFIG_GTK')}
622summary_info += {'GTK GL support': config_host.has_key('CONFIG_GTK_GL')}
623# TODO: add back version
624summary_info += {'VTE support': config_host.has_key('CONFIG_VTE')}
625summary_info += {'TLS priority': config_host['CONFIG_TLS_PRIORITY']}
626summary_info += {'GNUTLS support': config_host.has_key('CONFIG_GNUTLS')}
627# TODO: add back version
628summary_info += {'libgcrypt': config_host.has_key('CONFIG_GCRYPT')}
629if config_host.has_key('CONFIG_GCRYPT')
630 summary_info += {' hmac': config_host.has_key('CONFIG_GCRYPT_HMAC')}
631 summary_info += {' XTS': not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')}
632endif
633# TODO: add back version
634summary_info += {'nettle': config_host.has_key('CONFIG_NETTLE')}
635if config_host.has_key('CONFIG_NETTLE')
636 summary_info += {' XTS': not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')}
637endif
638summary_info += {'libtasn1': config_host.has_key('CONFIG_TASN1')}
639summary_info += {'PAM': config_host.has_key('CONFIG_AUTH_PAM')}
640summary_info += {'iconv support': config_host.has_key('CONFIG_ICONV')}
641summary_info += {'curses support': config_host.has_key('CONFIG_CURSES')}
642# TODO: add back version
643summary_info += {'virgl support': config_host.has_key('CONFIG_VIRGL')}
644summary_info += {'curl support': config_host.has_key('CONFIG_CURL')}
645summary_info += {'mingw32 support': targetos == 'windows'}
646summary_info += {'Audio drivers': config_host['CONFIG_AUDIO_DRIVERS']}
647summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']}
648summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']}
649summary_info += {'VirtFS support': config_host.has_key('CONFIG_VIRTFS')}
650summary_info += {'Multipath support': config_host.has_key('CONFIG_MPATH')}
651summary_info += {'VNC support': config_host.has_key('CONFIG_VNC')}
652if config_host.has_key('CONFIG_VNC')
653 summary_info += {'VNC SASL support': config_host.has_key('CONFIG_VNC_SASL')}
654 summary_info += {'VNC JPEG support': config_host.has_key('CONFIG_VNC_JPEG')}
655 summary_info += {'VNC PNG support': config_host.has_key('CONFIG_VNC_PNG')}
656endif
657summary_info += {'xen support': config_host.has_key('CONFIG_XEN_BACKEND')}
658if config_host.has_key('CONFIG_XEN_BACKEND')
659 summary_info += {'xen ctrl version': config_host['CONFIG_XEN_CTRL_INTERFACE_VERSION']}
660endif
661summary_info += {'brlapi support': config_host.has_key('CONFIG_BRLAPI')}
662summary_info += {'Documentation': config_host.has_key('BUILD_DOCS')}
663summary_info += {'PIE': get_option('b_pie')}
664summary_info += {'vde support': config_host.has_key('CONFIG_VDE')}
665summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')}
666summary_info += {'Linux AIO support': config_host.has_key('CONFIG_LINUX_AIO')}
667summary_info += {'Linux io_uring support': config_host.has_key('CONFIG_LINUX_IO_URING')}
668summary_info += {'ATTR/XATTR support': config_host.has_key('CONFIG_ATTR')}
669summary_info += {'Install blobs': config_host.has_key('INSTALL_BLOBS')}
670# TODO: add back KVM/HAX/HVF/WHPX/TCG
671#summary_info += {'KVM support': have_kvm'}
672#summary_info += {'HAX support': have_hax'}
673#summary_info += {'HVF support': have_hvf'}
674#summary_info += {'WHPX support': have_whpx'}
675#summary_info += {'TCG support': have_tcg'}
676#if get_option('tcg')
677# summary_info += {'TCG debug enabled': config_host.has_key('CONFIG_DEBUG_TCG')}
678# summary_info += {'TCG interpreter': config_host.has_key('CONFIG_TCG_INTERPRETER')}
679#endif
680summary_info += {'malloc trim support': config_host.has_key('CONFIG_MALLOC_TRIM')}
681summary_info += {'RDMA support': config_host.has_key('CONFIG_RDMA')}
682summary_info += {'PVRDMA support': config_host.has_key('CONFIG_PVRDMA')}
683summary_info += {'fdt support': config_host.has_key('CONFIG_FDT')}
684summary_info += {'membarrier': config_host.has_key('CONFIG_MEMBARRIER')}
685summary_info += {'preadv support': config_host.has_key('CONFIG_PREADV')}
686summary_info += {'fdatasync': config_host.has_key('CONFIG_FDATASYNC')}
687summary_info += {'madvise': config_host.has_key('CONFIG_MADVISE')}
688summary_info += {'posix_madvise': config_host.has_key('CONFIG_POSIX_MADVISE')}
689summary_info += {'posix_memalign': config_host.has_key('CONFIG_POSIX_MEMALIGN')}
690summary_info += {'libcap-ng support': config_host.has_key('CONFIG_LIBCAP_NG')}
691summary_info += {'vhost-net support': config_host.has_key('CONFIG_VHOST_NET')}
692summary_info += {'vhost-crypto support': config_host.has_key('CONFIG_VHOST_CRYPTO')}
693summary_info += {'vhost-scsi support': config_host.has_key('CONFIG_VHOST_SCSI')}
694summary_info += {'vhost-vsock support': config_host.has_key('CONFIG_VHOST_VSOCK')}
695summary_info += {'vhost-user support': config_host.has_key('CONFIG_VHOST_KERNEL')}
696summary_info += {'vhost-user-fs support': config_host.has_key('CONFIG_VHOST_USER_FS')}
697summary_info += {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST_VDPA')}
698summary_info += {'Trace backends': config_host['TRACE_BACKENDS']}
699if config_host['TRACE_BACKENDS'].split().contains('simple')
700 summary_info += {'Trace output file': config_host['CONFIG_TRACE_FILE'] + '-<pid>'}
701endif
702# TODO: add back protocol and server version
703summary_info += {'spice support': config_host.has_key('CONFIG_SPICE')}
704summary_info += {'rbd support': config_host.has_key('CONFIG_RBD')}
705summary_info += {'xfsctl support': config_host.has_key('CONFIG_XFS')}
706summary_info += {'smartcard support': config_host.has_key('CONFIG_SMARTCARD')}
707summary_info += {'libusb': config_host.has_key('CONFIG_USB_LIBUSB')}
708summary_info += {'usb net redir': config_host.has_key('CONFIG_USB_REDIR')}
709summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')}
710summary_info += {'OpenGL dmabufs': config_host.has_key('CONFIG_OPENGL_DMABUF')}
711summary_info += {'libiscsi support': config_host.has_key('CONFIG_LIBISCSI')}
712summary_info += {'libnfs support': config_host.has_key('CONFIG_LIBNFS')}
713summary_info += {'build guest agent': config_host.has_key('CONFIG_GUEST_AGENT')}
714if targetos == 'windows'
715 if 'WIN_SDK' in config_host
716 summary_info += {'Windows SDK': config_host['WIN_SDK']}
717 endif
718 summary_info += {'QGA VSS support': config_host.has_key('CONFIG_QGA_VSS')}
719 summary_info += {'QGA w32 disk info': config_host.has_key('CONFIG_QGA_NTDDSCSI')}
720 summary_info += {'QGA MSI support': config_host.has_key('CONFIG_QGA_MSI_ENABLED')}
721endif
722summary_info += {'seccomp support': config_host.has_key('CONFIG_SECCOMP')}
723summary_info += {'coroutine backend': config_host['CONFIG_COROUTINE_BACKEND']}
724summary_info += {'coroutine pool': config_host['CONFIG_COROUTINE_POOL'] == '1'}
725summary_info += {'debug stack usage': config_host.has_key('CONFIG_DEBUG_STACK_USAGE')}
726summary_info += {'mutex debugging': config_host.has_key('CONFIG_DEBUG_MUTEX')}
727summary_info += {'crypto afalg': config_host.has_key('CONFIG_AF_ALG')}
728summary_info += {'GlusterFS support': config_host.has_key('CONFIG_GLUSTERFS')}
bf0e56a3 729summary_info += {'gcov': get_option('b_coverage')}
f9332757
PB
730summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')}
731summary_info += {'libssh support': config_host.has_key('CONFIG_LIBSSH')}
732summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')}
733summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')}
734summary_info += {'lzo support': config_host.has_key('CONFIG_LZO')}
735summary_info += {'snappy support': config_host.has_key('CONFIG_SNAPPY')}
736summary_info += {'bzip2 support': config_host.has_key('CONFIG_BZIP2')}
737summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')}
738summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')}
739summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')}
740summary_info += {'libxml2': config_host.has_key('CONFIG_LIBXML2')}
741summary_info += {'tcmalloc support': config_host.has_key('CONFIG_TCMALLOC')}
742summary_info += {'jemalloc support': config_host.has_key('CONFIG_JEMALLOC')}
743summary_info += {'avx2 optimization': config_host.has_key('CONFIG_AVX2_OPT')}
744summary_info += {'avx512f optimization': config_host.has_key('CONFIG_AVX512F_OPT')}
745summary_info += {'replication support': config_host.has_key('CONFIG_REPLICATION')}
746summary_info += {'bochs support': config_host.has_key('CONFIG_BOCHS')}
747summary_info += {'cloop support': config_host.has_key('CONFIG_CLOOP')}
748summary_info += {'dmg support': config_host.has_key('CONFIG_DMG')}
749summary_info += {'qcow v1 support': config_host.has_key('CONFIG_QCOW1')}
750summary_info += {'vdi support': config_host.has_key('CONFIG_VDI')}
751summary_info += {'vvfat support': config_host.has_key('CONFIG_VVFAT')}
752summary_info += {'qed support': config_host.has_key('CONFIG_QED')}
753summary_info += {'parallels support': config_host.has_key('CONFIG_PARALLELS')}
754summary_info += {'sheepdog support': config_host.has_key('CONFIG_SHEEPDOG')}
755summary_info += {'capstone': config_host.has_key('CONFIG_CAPSTONE')}
756summary_info += {'libpmem support': config_host.has_key('CONFIG_LIBPMEM')}
757summary_info += {'libdaxctl support': config_host.has_key('CONFIG_LIBDAXCTL')}
758summary_info += {'libudev': config_host.has_key('CONFIG_LIBUDEV')}
759summary_info += {'default devices': config_host['CONFIG_MINIKCONF_MODE'] == '--defconfig'}
760summary_info += {'plugin support': config_host.has_key('CONFIG_PLUGIN')}
761summary_info += {'fuzzing support': config_host.has_key('CONFIG_FUZZ')}
762if config_host.has_key('HAVE_GDB_BIN')
763 summary_info += {'gdb': config_host['HAVE_GDB_BIN']}
764endif
765summary_info += {'thread sanitizer': config_host.has_key('CONFIG_TSAN')}
766summary_info += {'rng-none': config_host.has_key('CONFIG_RNG_NONE')}
767summary_info += {'Linux keyring': config_host.has_key('CONFIG_SECRET_KEYRING')}
768summary(summary_info, bool_yn: true)
769
770if not supported_cpus.contains(cpu)
771 message()
772 warning('SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!')
773 message()
774 message('CPU host architecture ' + cpu + ' support is not currently maintained.')
775 message('The QEMU project intends to remove support for this host CPU in')
776 message('a future release if nobody volunteers to maintain it and to')
777 message('provide a build host for our continuous integration setup.')
778 message('configure has succeeded and you can continue to build, but')
779 message('if you care about QEMU on this platform you should contact')
780 message('us upstream at [email protected].')
781endif
782
783if not supported_oses.contains(targetos)
784 message()
785 warning('WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASES!')
786 message()
787 message('Host OS ' + targetos + 'support is not currently maintained.')
788 message('The QEMU project intends to remove support for this host OS in')
789 message('a future release if nobody volunteers to maintain it and to')
790 message('provide a build host for our continuous integration setup.')
791 message('configure has succeeded and you can continue to build, but')
792 message('if you care about QEMU on this platform you should contact')
793 message('us upstream at [email protected].')
794endif
This page took 0.115722 seconds and 4 git commands to generate.