blob: ca1e6906b7897db90900cbe2920a1dc03c063796 [file] [log] [blame]
Paolo Bonzinia5665052019-06-10 12:05:14 +02001project('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')
Paolo Bonzinia81df1b2020-08-19 08:44:56 -04007ss = import('sourceset')
8
Paolo Bonzinice1c1e72020-01-28 16:41:44 +01009sh = find_program('sh')
Paolo Bonzinia81df1b2020-08-19 08:44:56 -040010cc = meson.get_compiler('c')
Paolo Bonzinia5665052019-06-10 12:05:14 +020011config_host = keyval.load(meson.current_build_dir() / 'config-host.mak')
Paolo Bonzini2becc362020-02-03 11:42:03 +010012config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak')
Marc-André Lureau3154fee2019-08-29 22:07:01 +040013enable_modules = 'CONFIG_MODULES' in config_host
Paolo Bonzinia5665052019-06-10 12:05:14 +020014
15add_project_arguments(config_host['QEMU_CFLAGS'].split(),
16 native: false, language: ['c', 'objc'])
17add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
18 native: false, language: 'cpp')
19add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
20 native: false, language: ['c', 'cpp', 'objc'])
21add_project_arguments(config_host['QEMU_INCLUDES'].split(),
22 language: ['c', 'cpp', 'objc'])
23
Marc-André Lureaufc929892019-07-13 01:47:54 +040024python = import('python').find_installation()
25
26link_language = meson.get_external_property('link_language', 'cpp')
27if link_language == 'cpp'
28 add_languages('cpp', required: true, native: false)
29endif
Paolo Bonzinia5665052019-06-10 12:05:14 +020030if host_machine.system() == 'darwin'
31 add_languages('objc', required: false, native: false)
32endif
33
Paolo Bonzini968b4db2020-02-03 14:45:33 +010034if 'SPARSE_CFLAGS' in config_host
35 run_target('sparse',
36 command: [find_program('scripts/check_sparse.py'),
37 config_host['SPARSE_CFLAGS'].split(),
38 'compile_commands.json'])
39endif
40
Paolo Bonzinia5665052019-06-10 12:05:14 +020041configure_file(input: files('scripts/ninjatool.py'),
42 output: 'ninjatool',
43 configuration: config_host)
Paolo Bonzinif9332752020-02-03 13:28:38 +010044
45supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux']
46supported_cpus = ['ppc', 'ppc64', 's390x', 'sparc64', 'riscv32', 'riscv64', 'x86', 'x86_64',
47 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64']
48
49cpu = host_machine.cpu_family()
50targetos = host_machine.system()
51
Paolo Bonzinia81df1b2020-08-19 08:44:56 -040052m = cc.find_library('m', required: false)
53util = cc.find_library('util', required: false)
54socket = []
Marc-André Lureau04c6f1e2019-07-18 00:31:05 +040055version_res = []
Marc-André Lureaud92989a2019-08-20 19:48:59 +040056coref = []
57iokit = []
58cocoa = []
59hvf = []
Paolo Bonzinia81df1b2020-08-19 08:44:56 -040060if targetos == 'windows'
61 socket = cc.find_library('ws2_32')
Marc-André Lureau04c6f1e2019-07-18 00:31:05 +040062
63 win = import('windows')
64 version_res = win.compile_resources('version.rc',
65 depend_files: files('pc-bios/qemu-nsis.ico'),
66 include_directories: include_directories('.'))
Marc-André Lureaud92989a2019-08-20 19:48:59 +040067elif targetos == 'darwin'
68 coref = dependency('appleframeworks', modules: 'CoreFoundation')
69 iokit = dependency('appleframeworks', modules: 'IOKit')
70 cocoa = dependency('appleframeworks', modules: 'Cocoa')
71 hvf = dependency('appleframeworks', modules: 'Hypervisor')
Paolo Bonzinicfad62f2020-08-09 23:47:45 +020072elif targetos == 'sunos'
73 socket = [cc.find_library('socket'),
74 cc.find_library('nsl'),
75 cc.find_library('resolv')]
76elif targetos == 'haiku'
77 socket = [cc.find_library('posix_error_mapper'),
78 cc.find_library('network'),
79 cc.find_library('bsd')]
Paolo Bonzinia81df1b2020-08-19 08:44:56 -040080endif
81glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(),
82 link_args: config_host['GLIB_LIBS'].split())
83gio = not_found
84if 'CONFIG_GIO' in config_host
85 gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(),
86 link_args: config_host['GIO_LIBS'].split())
87endif
88lttng = not_found
89if 'CONFIG_TRACE_UST' in config_host
90 lttng = declare_dependency(link_args: config_host['LTTNG_UST_LIBS'].split())
91endif
92urcubp = not_found
93if 'CONFIG_TRACE_UST' in config_host
94 urcubp = declare_dependency(link_args: config_host['URCU_BP_LIBS'].split())
95endif
96nettle = not_found
97if 'CONFIG_NETTLE' in config_host
98 nettle = declare_dependency(compile_args: config_host['NETTLE_CFLAGS'].split(),
99 link_args: config_host['NETTLE_LIBS'].split())
100endif
101gnutls = not_found
102if 'CONFIG_GNUTLS' in config_host
103 gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(),
104 link_args: config_host['GNUTLS_LIBS'].split())
105endif
Marc-André Lureauea458962019-07-12 22:23:46 +0400106pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(),
107 link_args: config_host['PIXMAN_LIBS'].split())
Marc-André Lureau5e7fbd22019-07-15 22:54:34 +0400108pam = not_found
109if 'CONFIG_AUTH_PAM' in config_host
110 pam = cc.find_library('pam')
111endif
Marc-André Lureau5e5733e2019-08-29 22:34:43 +0400112libaio = cc.find_library('aio', required: false)
113zlib = not_found
114if 'CONFIG_ZLIB' in config_host
115 zlib = declare_dependency(compile_args: config_host['ZLIB_CFLAGS'].split(),
116 link_args: config_host['ZLIB_LIBS'].split())
117endif
118linux_io_uring = not_found
119if 'CONFIG_LINUX_IO_URING' in config_host
120 linux_io_uring = declare_dependency(compile_args: config_host['LINUX_IO_URING_CFLAGS'].split(),
121 link_args: config_host['LINUX_IO_URING_LIBS'].split())
122endif
123libxml2 = not_found
124if 'CONFIG_LIBXML2' in config_host
125 libxml2 = declare_dependency(compile_args: config_host['LIBXML2_CFLAGS'].split(),
126 link_args: config_host['LIBXML2_LIBS'].split())
127endif
128libnfs = not_found
129if 'CONFIG_LIBNFS' in config_host
130 libnfs = declare_dependency(link_args: config_host['LIBNFS_LIBS'].split())
131endif
Marc-André Lureauec0d5892019-07-15 15:04:49 +0400132libattr = not_found
133if 'CONFIG_ATTR' in config_host
134 libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split())
135endif
Paolo Bonzini3f99cf52020-02-05 09:45:39 +0100136seccomp = not_found
137if 'CONFIG_SECCOMP' in config_host
138 seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(),
139 link_args: config_host['SECCOMP_LIBS'].split())
140endif
141libcap_ng = not_found
142if 'CONFIG_LIBCAP_NG' in config_host
143 libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split())
144endif
Marc-André Lureauade60d42019-07-15 14:48:31 +0400145xkbcommon = not_found
146if 'CONFIG_XKBCOMMON' in config_host
147 xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(),
148 link_args: config_host['XKBCOMMON_LIBS'].split())
149endif
Paolo Bonzini478e9432020-08-17 12:47:55 +0200150pulse = not_found
151if 'CONFIG_LIBPULSE' in config_host
152 pulse = declare_dependency(compile_args: config_host['PULSE_CFLAGS'].split(),
153 link_args: config_host['PULSE_LIBS'].split())
154endif
155alsa = not_found
156if 'CONFIG_ALSA' in config_host
157 alsa = declare_dependency(compile_args: config_host['ALSA_CFLAGS'].split(),
158 link_args: config_host['ALSA_LIBS'].split())
159endif
160jack = not_found
161if 'CONFIG_LIBJACK' in config_host
162 jack = declare_dependency(link_args: config_host['JACK_LIBS'].split())
163endif
Paolo Bonzini26347332019-07-29 15:40:07 +0200164spice = not_found
165if 'CONFIG_SPICE' in config_host
166 spice = declare_dependency(compile_args: config_host['SPICE_CFLAGS'].split(),
167 link_args: config_host['SPICE_LIBS'].split())
168endif
Marc-André Lureau5ee24e72019-07-12 23:16:54 +0400169rt = cc.find_library('rt', required: false)
Marc-André Lureau897b5af2019-07-16 21:54:15 +0400170libmpathpersist = not_found
171if config_host.has_key('CONFIG_MPATH')
172 libmpathpersist = cc.find_library('mpathpersist')
173endif
Paolo Bonzini99650b62019-06-10 12:21:14 +0200174libiscsi = not_found
175if 'CONFIG_LIBISCSI' in config_host
176 libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),
177 link_args: config_host['LIBISCSI_LIBS'].split())
178endif
Marc-André Lureau5e5733e2019-08-29 22:34:43 +0400179zstd = not_found
180if 'CONFIG_ZSTD' in config_host
181 zstd = declare_dependency(compile_args: config_host['ZSTD_CFLAGS'].split(),
182 link_args: config_host['ZSTD_LIBS'].split())
183endif
Marc-André Lureauea458962019-07-12 22:23:46 +0400184gbm = not_found
185if 'CONFIG_GBM' in config_host
186 gbm = declare_dependency(compile_args: config_host['GBM_CFLAGS'].split(),
187 link_args: config_host['GBM_LIBS'].split())
188endif
189virgl = not_found
190if 'CONFIG_VIRGL' in config_host
191 virgl = declare_dependency(compile_args: config_host['VIRGL_CFLAGS'].split(),
192 link_args: config_host['VIRGL_LIBS'].split())
193endif
Marc-André Lureau1d7bb6a2019-07-12 23:47:06 +0400194curl = not_found
195if 'CONFIG_CURL' in config_host
196 curl = declare_dependency(compile_args: config_host['CURL_CFLAGS'].split(),
197 link_args: config_host['CURL_LIBS'].split())
198endif
Paolo Bonzinif15bff22019-07-18 13:19:02 +0200199libudev = not_found
200if 'CONFIG_LIBUDEV' in config_host
201 libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split())
202endif
Paolo Bonzini26347332019-07-29 15:40:07 +0200203brlapi = not_found
204if 'CONFIG_BRLAPI' in config_host
205 brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split())
206endif
207sdl = not_found
208if 'CONFIG_SDL' in config_host
209 sdl = declare_dependency(compile_args: config_host['SDL_CFLAGS'].split(),
210 link_args: config_host['SDL_LIBS'].split())
211endif
Marc-André Lureau5e5733e2019-08-29 22:34:43 +0400212rbd = not_found
213if 'CONFIG_RBD' in config_host
214 rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split())
215endif
216glusterfs = not_found
217if 'CONFIG_GLUSTERFS' in config_host
218 glusterfs = declare_dependency(compile_args: config_host['GLUSTERFS_CFLAGS'].split(),
219 link_args: config_host['GLUSTERFS_LIBS'].split())
220endif
221libssh = not_found
222if 'CONFIG_LIBSSH' in config_host
223 libssh = declare_dependency(compile_args: config_host['LIBSSH_CFLAGS'].split(),
224 link_args: config_host['LIBSSH_LIBS'].split())
225endif
226libbzip2 = not_found
227if 'CONFIG_BZIP2' in config_host
228 libbzip2 = declare_dependency(link_args: config_host['BZIP2_LIBS'].split())
229endif
230liblzfse = not_found
231if 'CONFIG_LZFSE' in config_host
232 liblzfse = declare_dependency(link_args: config_host['LZFSE_LIBS'].split())
233endif
Paolo Bonzini478e9432020-08-17 12:47:55 +0200234oss = not_found
235if 'CONFIG_AUDIO_OSS' in config_host
236 oss = declare_dependency(link_args: config_host['OSS_LIBS'].split())
237endif
238dsound = not_found
239if 'CONFIG_AUDIO_DSOUND' in config_host
240 dsound = declare_dependency(link_args: config_host['DSOUND_LIBS'].split())
241endif
242coreaudio = not_found
243if 'CONFIG_AUDIO_COREAUDIO' in config_host
244 coreaudio = declare_dependency(link_args: config_host['COREAUDIO_LIBS'].split())
245endif
Marc-André Lureau2b1ccdf2019-07-16 23:21:02 +0400246opengl = not_found
247if 'CONFIG_OPENGL' in config_host
248 opengl = declare_dependency(link_args: config_host['OPENGL_LIBS'].split())
249else
250endif
251gtk = not_found
252if 'CONFIG_GTK' in config_host
253 gtk = declare_dependency(compile_args: config_host['GTK_CFLAGS'].split(),
254 link_args: config_host['GTK_LIBS'].split())
255endif
256vte = not_found
257if 'CONFIG_VTE' in config_host
258 vte = declare_dependency(compile_args: config_host['VTE_CFLAGS'].split(),
259 link_args: config_host['VTE_LIBS'].split())
260endif
261x11 = not_found
262if 'CONFIG_X11' in config_host
263 x11 = declare_dependency(compile_args: config_host['X11_CFLAGS'].split(),
264 link_args: config_host['X11_LIBS'].split())
265endif
266curses = not_found
267if 'CONFIG_CURSES' in config_host
268 curses = declare_dependency(compile_args: config_host['CURSES_CFLAGS'].split(),
269 link_args: config_host['CURSES_LIBS'].split())
270endif
271iconv = not_found
272if 'CONFIG_ICONV' in config_host
273 iconv = declare_dependency(compile_args: config_host['ICONV_CFLAGS'].split(),
274 link_args: config_host['ICONV_LIBS'].split())
275endif
276gio = not_found
277if 'CONFIG_GIO' in config_host
278 gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(),
279 link_args: config_host['GIO_LIBS'].split())
280endif
281png = not_found
282if 'CONFIG_VNC_PNG' in config_host
283 png = declare_dependency(compile_args: config_host['PNG_CFLAGS'].split(),
284 link_args: config_host['PNG_LIBS'].split())
285endif
286jpeg = not_found
287if 'CONFIG_VNC_JPEG' in config_host
288 jpeg = declare_dependency(compile_args: config_host['JPEG_CFLAGS'].split(),
289 link_args: config_host['JPEG_LIBS'].split())
290endif
291sasl = not_found
292if 'CONFIG_VNC_SASL' in config_host
293 sasl = declare_dependency(compile_args: config_host['SASL_CFLAGS'].split(),
294 link_args: config_host['SASL_LIBS'].split())
295endif
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400296
Paolo Bonzini2becc362020-02-03 11:42:03 +0100297create_config = find_program('scripts/create_config')
298minikconf = find_program('scripts/minikconf.py')
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400299target_dirs = config_host['TARGET_DIRS'].split()
300have_user = false
301have_system = false
Paolo Bonzini2becc362020-02-03 11:42:03 +0100302config_devices_mak_list = []
303config_devices_h = {}
304config_target_mak = {}
305kconfig_external_symbols = [
306 'CONFIG_KVM',
307 'CONFIG_XEN',
308 'CONFIG_TPM',
309 'CONFIG_SPICE',
310 'CONFIG_IVSHMEM',
311 'CONFIG_OPENGL',
312 'CONFIG_X11',
313 'CONFIG_VHOST_USER',
314 'CONFIG_VHOST_KERNEL',
315 'CONFIG_VIRTFS',
316 'CONFIG_LINUX',
317 'CONFIG_PVRDMA',
318]
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400319foreach target : target_dirs
320 have_user = have_user or target.endswith('-user')
Paolo Bonzini2becc362020-02-03 11:42:03 +0100321 config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak') + config_host
322
323 if target.endswith('-softmmu')
324 have_system = true
325
326 base_kconfig = []
327 foreach sym : kconfig_external_symbols
328 if sym in config_target
329 base_kconfig += '@0@=y'.format(sym)
330 endif
331 endforeach
332
333 config_devices_mak = target + '-config-devices.mak'
334 config_devices_mak = configure_file(
335 input: ['default-configs' / target + '.mak', 'Kconfig'],
336 output: config_devices_mak,
337 depfile: config_devices_mak + '.d',
338 capture: true,
339 command: [minikconf, config_host['CONFIG_MINIKCONF_MODE'],
340 config_devices_mak, '@DEPFILE@', '@INPUT@',
341 base_kconfig])
342 config_devices_h += {target: custom_target(
343 target + '-config-devices.h',
344 input: config_devices_mak,
345 output: target + '-config-devices.h',
346 capture: true,
347 command: [create_config, '@INPUT@'])}
348 config_devices_mak_list += config_devices_mak
349 config_target += keyval.load(config_devices_mak)
350 endif
351 config_target_mak += {target: config_target}
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400352endforeach
353have_tools = 'CONFIG_TOOLS' in config_host
354have_block = have_system or have_tools
355
Paolo Bonzini2becc362020-02-03 11:42:03 +0100356grepy = find_program('scripts/grepy.sh')
357# This configuration is used to build files that are shared by
358# multiple binaries, and then extracted out of the "common"
359# static_library target.
360#
361# We do not use all_sources()/all_dependencies(), because it would
362# build literally all source files, including devices only used by
363# targets that are not built for this compilation. The CONFIG_ALL
364# pseudo symbol replaces it.
365
366if have_system
367 config_all_devices_mak = configure_file(
368 output: 'config-all-devices.mak',
369 input: config_devices_mak_list,
370 capture: true,
371 command: [grepy, '@INPUT@'],
372 )
373 config_all_devices = keyval.load(config_all_devices_mak)
374else
375 config_all_devices = {}
376endif
377config_all = config_all_devices
378config_all += config_host
379config_all += config_all_disas
380config_all += {
381 'CONFIG_XEN': config_host.has_key('CONFIG_XEN_BACKEND'),
382 'CONFIG_SOFTMMU': have_system,
383 'CONFIG_USER_ONLY': have_user,
384 'CONFIG_ALL': true,
385}
386
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400387# Generators
388
Marc-André Lureau2c273f32019-07-15 17:10:19 +0400389genh = []
Marc-André Lureau3f885652019-07-15 18:06:04 +0400390hxtool = find_program('scripts/hxtool')
Marc-André Lureau650b5d52019-07-15 17:36:47 +0400391shaderinclude = find_program('scripts/shaderinclude.pl')
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400392qapi_gen = find_program('scripts/qapi-gen.py')
393qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py',
394 meson.source_root() / 'scripts/qapi/commands.py',
395 meson.source_root() / 'scripts/qapi/common.py',
396 meson.source_root() / 'scripts/qapi/doc.py',
397 meson.source_root() / 'scripts/qapi/error.py',
398 meson.source_root() / 'scripts/qapi/events.py',
399 meson.source_root() / 'scripts/qapi/expr.py',
400 meson.source_root() / 'scripts/qapi/gen.py',
401 meson.source_root() / 'scripts/qapi/introspect.py',
402 meson.source_root() / 'scripts/qapi/parser.py',
403 meson.source_root() / 'scripts/qapi/schema.py',
404 meson.source_root() / 'scripts/qapi/source.py',
405 meson.source_root() / 'scripts/qapi/types.py',
406 meson.source_root() / 'scripts/qapi/visit.py',
407 meson.source_root() / 'scripts/qapi/common.py',
408 meson.source_root() / 'scripts/qapi/doc.py',
409 meson.source_root() / 'scripts/qapi-gen.py'
410]
411
412tracetool = [
413 python, files('scripts/tracetool.py'),
414 '--backend=' + config_host['TRACE_BACKENDS']
415]
416
Marc-André Lureau2c273f32019-07-15 17:10:19 +0400417qemu_version_cmd = [find_program('scripts/qemu-version.sh'),
418 meson.current_source_dir(),
419 config_host['PKGVERSION'], config_host['VERSION']]
420qemu_version = custom_target('qemu-version.h',
421 output: 'qemu-version.h',
422 command: qemu_version_cmd,
423 capture: true,
424 build_by_default: true,
425 build_always_stale: true)
426genh += qemu_version
427
Paolo Bonzini2becc362020-02-03 11:42:03 +0100428config_host_h = custom_target('config-host.h',
429 input: meson.current_build_dir() / 'config-host.mak',
430 output: 'config-host.h',
431 capture: true,
432 command: [create_config, '@INPUT@'])
433genh += config_host_h
434
Marc-André Lureau3f885652019-07-15 18:06:04 +0400435hxdep = []
436hx_headers = [
437 ['qemu-options.hx', 'qemu-options.def'],
438 ['qemu-img-cmds.hx', 'qemu-img-cmds.h'],
439]
440if have_system
441 hx_headers += [
442 ['hmp-commands.hx', 'hmp-commands.h'],
443 ['hmp-commands-info.hx', 'hmp-commands-info.h'],
444 ]
445endif
446foreach d : hx_headers
Marc-André Lureaub7c70bf2019-07-16 21:37:25 +0400447 hxdep += custom_target(d[1],
Marc-André Lureau3f885652019-07-15 18:06:04 +0400448 input: files(d[0]),
449 output: d[1],
450 capture: true,
451 build_by_default: true, # to be removed when added to a target
452 command: [hxtool, '-h', '@INPUT0@'])
453endforeach
454genh += hxdep
455
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400456# Collect sourcesets.
457
458util_ss = ss.source_set()
459stub_ss = ss.source_set()
460trace_ss = ss.source_set()
Marc-André Lureau3154fee2019-08-29 22:07:01 +0400461block_ss = ss.source_set()
Paolo Bonzini2becc362020-02-03 11:42:03 +0100462common_ss = ss.source_set()
463softmmu_ss = ss.source_set()
464user_ss = ss.source_set()
465bsd_user_ss = ss.source_set()
466linux_user_ss = ss.source_set()
467specific_ss = ss.source_set()
468
Marc-André Lureau3154fee2019-08-29 22:07:01 +0400469modules = {}
Paolo Bonzini2becc362020-02-03 11:42:03 +0100470hw_arch = {}
471target_arch = {}
472target_softmmu_arch = {}
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400473
474###############
475# Trace files #
476###############
477
478trace_events_subdirs = [
479 'accel/kvm',
480 'accel/tcg',
481 'crypto',
482 'monitor',
483]
484if have_user
485 trace_events_subdirs += [ 'linux-user' ]
486endif
487if have_block
488 trace_events_subdirs += [
489 'authz',
490 'block',
491 'io',
492 'nbd',
493 'scsi',
494 ]
495endif
496if have_system
497 trace_events_subdirs += [
498 'audio',
499 'backends',
500 'backends/tpm',
501 'chardev',
502 'hw/9pfs',
503 'hw/acpi',
504 'hw/alpha',
505 'hw/arm',
506 'hw/audio',
507 'hw/block',
508 'hw/block/dataplane',
509 'hw/char',
510 'hw/display',
511 'hw/dma',
512 'hw/hppa',
513 'hw/hyperv',
514 'hw/i2c',
515 'hw/i386',
516 'hw/i386/xen',
517 'hw/ide',
518 'hw/input',
519 'hw/intc',
520 'hw/isa',
521 'hw/mem',
522 'hw/mips',
523 'hw/misc',
524 'hw/misc/macio',
525 'hw/net',
526 'hw/nvram',
527 'hw/pci',
528 'hw/pci-host',
529 'hw/ppc',
530 'hw/rdma',
531 'hw/rdma/vmw',
532 'hw/rtc',
533 'hw/s390x',
534 'hw/scsi',
535 'hw/sd',
536 'hw/sparc',
537 'hw/sparc64',
538 'hw/ssi',
539 'hw/timer',
540 'hw/tpm',
541 'hw/usb',
542 'hw/vfio',
543 'hw/virtio',
544 'hw/watchdog',
545 'hw/xen',
546 'hw/gpio',
547 'hw/riscv',
548 'migration',
549 'net',
550 'ui',
551 ]
552endif
553trace_events_subdirs += [
554 'hw/core',
555 'qapi',
556 'qom',
557 'target/arm',
558 'target/hppa',
559 'target/i386',
560 'target/mips',
561 'target/ppc',
562 'target/riscv',
563 'target/s390x',
564 'target/sparc',
565 'util',
566]
567
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400568subdir('qapi')
569subdir('qobject')
570subdir('stubs')
571subdir('trace')
572subdir('util')
Marc-André Lureau5582c582019-07-16 19:28:54 +0400573subdir('qom')
574subdir('authz')
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400575subdir('crypto')
576subdir('storage-daemon')
Marc-André Lureau2d78b562019-07-15 16:00:36 +0400577subdir('ui')
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400578
Marc-André Lureau3154fee2019-08-29 22:07:01 +0400579
580if enable_modules
581 libmodulecommon = static_library('module-common', files('module-common.c') + genh, pic: true, c_args: '-DBUILD_DSO')
582 modulecommon = declare_dependency(link_whole: libmodulecommon, compile_args: '-DBUILD_DSO')
583endif
584
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400585# Build targets from sourcesets
586
Paolo Bonzini2becc362020-02-03 11:42:03 +0100587stub_ss = stub_ss.apply(config_all, strict: false)
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400588
589util_ss.add_all(trace_ss)
Paolo Bonzini2becc362020-02-03 11:42:03 +0100590util_ss = util_ss.apply(config_all, strict: false)
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400591libqemuutil = static_library('qemuutil',
592 sources: util_ss.sources() + stub_ss.sources() + genh,
593 dependencies: [util_ss.dependencies(), m, glib, socket])
594qemuutil = declare_dependency(link_with: libqemuutil,
Marc-André Lureau04c6f1e2019-07-18 00:31:05 +0400595 sources: genh + version_res)
Paolo Bonzinia81df1b2020-08-19 08:44:56 -0400596
Paolo Bonzini478e9432020-08-17 12:47:55 +0200597subdir('audio')
Marc-André Lureau7fcfd452019-07-16 19:33:55 +0400598subdir('io')
Marc-André Lureau848e8ff2019-07-15 23:18:07 +0400599subdir('chardev')
Marc-André Lureauec0d5892019-07-15 15:04:49 +0400600subdir('fsdev')
Marc-André Lureaud3b18482019-08-17 14:55:32 +0400601subdir('target')
Marc-André Lureauec0d5892019-07-15 15:04:49 +0400602
Marc-André Lureau5e5733e2019-08-29 22:34:43 +0400603block_ss.add(files(
604 'block.c',
605 'blockjob.c',
606 'job.c',
607 'qemu-io-cmds.c',
608))
609block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c'))
610
611subdir('nbd')
612subdir('scsi')
613subdir('block')
614
Paolo Bonzinia2ce7db2020-08-04 20:00:40 +0200615# needed for fuzzing binaries
616subdir('tests/qtest/libqos')
617
Marc-André Lureau3154fee2019-08-29 22:07:01 +0400618block_mods = []
619softmmu_mods = []
620foreach d, list : modules
621 foreach m, module_ss : list
622 if enable_modules and targetos != 'windows'
623 module_ss = module_ss.apply(config_host, strict: false)
624 sl = static_library(d + '-' + m, [genh, module_ss.sources()],
625 dependencies: [modulecommon, module_ss.dependencies()], pic: true)
626 if d == 'block'
627 block_mods += sl
628 else
629 softmmu_mods += sl
630 endif
631 else
632 if d == 'block'
633 block_ss.add_all(module_ss)
634 else
635 softmmu_ss.add_all(module_ss)
636 endif
637 endif
638 endforeach
639endforeach
640
641nm = find_program('nm')
642undefsym = find_program('scripts/undefsym.sh')
643block_syms = custom_target('block.syms', output: 'block.syms',
644 input: [libqemuutil, block_mods],
645 capture: true,
646 command: [undefsym, nm, '@INPUT@'])
647qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
648 input: [libqemuutil, softmmu_mods],
649 capture: true,
650 command: [undefsym, nm, '@INPUT@'])
651
Marc-André Lureau5e5733e2019-08-29 22:34:43 +0400652block_ss = block_ss.apply(config_host, strict: false)
653libblock = static_library('block', block_ss.sources() + genh,
654 dependencies: block_ss.dependencies(),
655 link_depends: block_syms,
656 name_suffix: 'fa',
657 build_by_default: false)
658
659block = declare_dependency(link_whole: [libblock],
Marc-André Lureaub7c70bf2019-07-16 21:37:25 +0400660 link_args: '@block.syms',
661 dependencies: [crypto, io])
Marc-André Lureau5e5733e2019-08-29 22:34:43 +0400662
Marc-André Lureau3154fee2019-08-29 22:07:01 +0400663foreach m : block_mods + softmmu_mods
664 shared_module(m.name(),
665 name_prefix: '',
666 link_whole: m,
667 install: true,
668 install_dir: config_host['qemu_moddir'])
669endforeach
670
Paolo Bonzini2becc362020-02-03 11:42:03 +0100671common_ss.add_all(when: 'CONFIG_SOFTMMU', if_true: softmmu_ss)
672common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss)
673
674common_all = common_ss.apply(config_all, strict: false)
675common_all = static_library('common',
676 build_by_default: false,
677 sources: common_all.sources() + genh,
678 dependencies: common_all.dependencies(),
679 name_suffix: 'fa')
680
681foreach target : target_dirs
682 config_target = config_target_mak[target]
683 target_name = config_target['TARGET_NAME']
684 arch = config_target['TARGET_BASE_ARCH']
685 arch_srcs = []
686
687 target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])]
688 if targetos == 'linux'
689 target_inc += include_directories('linux-headers', is_system: true)
690 endif
691 if target.endswith('-softmmu')
692 qemu_target_name = 'qemu-system-' + target_name
693 target_type='system'
694 arch_srcs += config_devices_h[target]
695 else
696 target_type='user'
697 qemu_target_name = 'qemu-' + target_name
698 if 'CONFIG_LINUX_USER' in config_target
699 base_dir = 'linux-user'
700 target_inc += include_directories('linux-user/host/' / config_host['ARCH'])
701 else
702 base_dir = 'bsd-user'
703 endif
704 target_inc += include_directories(
705 base_dir,
706 base_dir / config_target['TARGET_ABI_DIR'],
707 )
708 endif
709
710 target_common = common_ss.apply(config_target, strict: false)
711 objects = common_all.extract_objects(target_common.sources())
712
713 # TODO: Change to generator once obj-y goes away
714 config_target_h = custom_target(target + '-config-target.h',
715 input: meson.current_build_dir() / target / 'config-target.mak',
716 output: target + '-config-target.h',
717 capture: true,
718 command: [create_config, '@INPUT@'])
719
720 target_specific = specific_ss.apply(config_target, strict: false)
721 arch_srcs += target_specific.sources()
722
723 static_library('qemu-' + target,
724 sources: arch_srcs + [config_target_h] + genh,
725 objects: objects,
726 include_directories: target_inc,
727 c_args: ['-DNEED_CPU_H',
728 '-DCONFIG_TARGET="@0@-config-target.h"'.format(target),
729 '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)],
730 name_suffix: 'fa')
731endforeach
732
Paolo Bonzini931049b2020-02-05 09:44:24 +0100733# Other build targets
Marc-André Lureau897b5af2019-07-16 21:54:15 +0400734
Paolo Bonzinif15bff22019-07-18 13:19:02 +0200735if 'CONFIG_GUEST_AGENT' in config_host
736 subdir('qga')
737endif
738
Paolo Bonzini931049b2020-02-05 09:44:24 +0100739if have_tools
Marc-André Lureaub7c70bf2019-07-16 21:37:25 +0400740 qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep],
741 dependencies: [authz, block, crypto, io, qom, qemuutil], install: true)
742 qemu_io = executable('qemu-io', files('qemu-io.c'),
743 dependencies: [block, qemuutil], install: true)
744 if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd')
745 qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
746 dependencies: [block, qemuutil], install: true)
747 endif
748
Paolo Bonzinia9c97272019-06-10 12:27:52 +0200749 subdir('contrib/rdmacm-mux')
Marc-André Lureau1d7bb6a2019-07-12 23:47:06 +0400750 subdir('contrib/elf2dmp')
Paolo Bonzinia9c97272019-06-10 12:27:52 +0200751
Marc-André Lureauade60d42019-07-15 14:48:31 +0400752 if 'CONFIG_XKBCOMMON' in config_host
753 executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c'),
754 dependencies: [qemuutil, xkbcommon], install: true)
755 endif
756
Marc-André Lureau157e7b12019-07-15 14:50:58 +0400757 executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'),
758 dependencies: qemuutil,
759 install: true)
760
Paolo Bonzini931049b2020-02-05 09:44:24 +0100761 if 'CONFIG_VHOST_USER' in config_host
762 subdir('contrib/libvhost-user')
Paolo Bonzini2d7ac0a2019-06-10 12:18:02 +0200763 subdir('contrib/vhost-user-blk')
Marc-André Lureauea458962019-07-12 22:23:46 +0400764 if 'CONFIG_LINUX' in config_host
765 subdir('contrib/vhost-user-gpu')
766 endif
Marc-André Lureau32fcc622019-07-12 22:11:20 +0400767 subdir('contrib/vhost-user-input')
Paolo Bonzini99650b62019-06-10 12:21:14 +0200768 subdir('contrib/vhost-user-scsi')
Paolo Bonzini931049b2020-02-05 09:44:24 +0100769 endif
Marc-André Lureau8f51e012019-07-15 14:39:25 +0400770
771 if targetos == 'linux'
772 executable('qemu-bridge-helper', files('qemu-bridge-helper.c'),
773 dependencies: [qemuutil, libcap_ng],
774 install: true,
775 install_dir: get_option('libexecdir'))
Marc-André Lureau897b5af2019-07-16 21:54:15 +0400776
777 executable('qemu-pr-helper', files('scsi/qemu-pr-helper.c', 'scsi/utils.c'),
778 dependencies: [authz, crypto, io, qom, qemuutil,
779 libcap_ng, libudev, libmpathpersist],
780 install: true)
Marc-André Lureau8f51e012019-07-15 14:39:25 +0400781 endif
782
Marc-André Lureau5ee24e72019-07-12 23:16:54 +0400783 if 'CONFIG_IVSHMEM' in config_host
784 subdir('contrib/ivshmem-client')
785 subdir('contrib/ivshmem-server')
786 endif
Paolo Bonzini931049b2020-02-05 09:44:24 +0100787endif
788
Paolo Bonzini3f99cf52020-02-05 09:45:39 +0100789subdir('tools')
Marc-André Lureaubdcbea72019-07-15 21:22:31 +0400790subdir('pc-bios')
Paolo Bonzinice1c1e72020-01-28 16:41:44 +0100791subdir('tests')
Paolo Bonzini3f99cf52020-02-05 09:45:39 +0100792
Paolo Bonzinif9332752020-02-03 13:28:38 +0100793summary_info = {}
794summary_info += {'Install prefix': config_host['prefix']}
795summary_info += {'BIOS directory': config_host['qemu_datadir']}
796summary_info += {'firmware path': config_host['qemu_firmwarepath']}
797summary_info += {'binary directory': config_host['bindir']}
798summary_info += {'library directory': config_host['libdir']}
799summary_info += {'module directory': config_host['qemu_moddir']}
800summary_info += {'libexec directory': config_host['libexecdir']}
801summary_info += {'include directory': config_host['includedir']}
802summary_info += {'config directory': config_host['sysconfdir']}
803if targetos != 'windows'
804 summary_info += {'local state directory': config_host['qemu_localstatedir']}
805 summary_info += {'Manual directory': config_host['mandir']}
806else
807 summary_info += {'local state directory': 'queried at runtime'}
808endif
809summary_info += {'Build directory': meson.current_build_dir()}
810summary_info += {'Source path': meson.current_source_dir()}
811summary_info += {'GIT binary': config_host['GIT']}
812summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']}
813summary_info += {'C compiler': meson.get_compiler('c').cmd_array()[0]}
814summary_info += {'Host C compiler': meson.get_compiler('c', native: true).cmd_array()[0]}
815if link_language == 'cpp'
816 summary_info += {'C++ compiler': meson.get_compiler('cpp').cmd_array()[0]}
817else
818 summary_info += {'C++ compiler': false}
819endif
820if targetos == 'darwin'
821 summary_info += {'Objective-C compiler': meson.get_compiler('objc').cmd_array()[0]}
822endif
823summary_info += {'ARFLAGS': config_host['ARFLAGS']}
824summary_info += {'CFLAGS': config_host['CFLAGS']}
825summary_info += {'QEMU_CFLAGS': config_host['QEMU_CFLAGS']}
826summary_info += {'QEMU_LDFLAGS': config_host['QEMU_LDFLAGS']}
827summary_info += {'make': config_host['MAKE']}
828summary_info += {'install': config_host['INSTALL']}
829summary_info += {'python': '@0@ (version: @1@)'.format(python.full_path(), python.language_version())}
830summary_info += {'sphinx-build': config_host['SPHINX_BUILD']}
831summary_info += {'genisoimage': config_host['GENISOIMAGE']}
832# TODO: add back version
833summary_info += {'slirp support': config_host.has_key('CONFIG_SLIRP')}
834if config_host.has_key('CONFIG_SLIRP')
835 summary_info += {'smbd': config_host['CONFIG_SMBD_COMMAND']}
836endif
837summary_info += {'module support': config_host.has_key('CONFIG_MODULES')}
838if config_host.has_key('CONFIG_MODULES')
839 summary_info += {'alternative module path': config_host.has_key('CONFIG_MODULE_UPGRADES')}
840endif
841summary_info += {'host CPU': cpu}
842summary_info += {'host endianness': build_machine.endian()}
843summary_info += {'target list': config_host['TARGET_DIRS']}
844summary_info += {'gprof enabled': config_host.has_key('CONFIG_GPROF')}
845summary_info += {'sparse enabled': meson.get_compiler('c').cmd_array().contains('cgcc')}
846summary_info += {'strip binaries': get_option('strip')}
847summary_info += {'profiler': config_host.has_key('CONFIG_PROFILER')}
848summary_info += {'static build': config_host.has_key('CONFIG_TOOLS')}
849if targetos == 'darwin'
850 summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')}
851endif
852# TODO: add back version
853summary_info += {'SDL support': config_host.has_key('CONFIG_SDL')}
854summary_info += {'SDL image support': config_host.has_key('CONFIG_SDL_IMAGE')}
855# TODO: add back version
856summary_info += {'GTK support': config_host.has_key('CONFIG_GTK')}
857summary_info += {'GTK GL support': config_host.has_key('CONFIG_GTK_GL')}
858# TODO: add back version
859summary_info += {'VTE support': config_host.has_key('CONFIG_VTE')}
860summary_info += {'TLS priority': config_host['CONFIG_TLS_PRIORITY']}
861summary_info += {'GNUTLS support': config_host.has_key('CONFIG_GNUTLS')}
862# TODO: add back version
863summary_info += {'libgcrypt': config_host.has_key('CONFIG_GCRYPT')}
864if config_host.has_key('CONFIG_GCRYPT')
865 summary_info += {' hmac': config_host.has_key('CONFIG_GCRYPT_HMAC')}
866 summary_info += {' XTS': not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')}
867endif
868# TODO: add back version
869summary_info += {'nettle': config_host.has_key('CONFIG_NETTLE')}
870if config_host.has_key('CONFIG_NETTLE')
871 summary_info += {' XTS': not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')}
872endif
873summary_info += {'libtasn1': config_host.has_key('CONFIG_TASN1')}
874summary_info += {'PAM': config_host.has_key('CONFIG_AUTH_PAM')}
875summary_info += {'iconv support': config_host.has_key('CONFIG_ICONV')}
876summary_info += {'curses support': config_host.has_key('CONFIG_CURSES')}
877# TODO: add back version
878summary_info += {'virgl support': config_host.has_key('CONFIG_VIRGL')}
879summary_info += {'curl support': config_host.has_key('CONFIG_CURL')}
880summary_info += {'mingw32 support': targetos == 'windows'}
881summary_info += {'Audio drivers': config_host['CONFIG_AUDIO_DRIVERS']}
882summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']}
883summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']}
884summary_info += {'VirtFS support': config_host.has_key('CONFIG_VIRTFS')}
885summary_info += {'Multipath support': config_host.has_key('CONFIG_MPATH')}
886summary_info += {'VNC support': config_host.has_key('CONFIG_VNC')}
887if config_host.has_key('CONFIG_VNC')
888 summary_info += {'VNC SASL support': config_host.has_key('CONFIG_VNC_SASL')}
889 summary_info += {'VNC JPEG support': config_host.has_key('CONFIG_VNC_JPEG')}
890 summary_info += {'VNC PNG support': config_host.has_key('CONFIG_VNC_PNG')}
891endif
892summary_info += {'xen support': config_host.has_key('CONFIG_XEN_BACKEND')}
893if config_host.has_key('CONFIG_XEN_BACKEND')
894 summary_info += {'xen ctrl version': config_host['CONFIG_XEN_CTRL_INTERFACE_VERSION']}
895endif
896summary_info += {'brlapi support': config_host.has_key('CONFIG_BRLAPI')}
897summary_info += {'Documentation': config_host.has_key('BUILD_DOCS')}
898summary_info += {'PIE': get_option('b_pie')}
899summary_info += {'vde support': config_host.has_key('CONFIG_VDE')}
900summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')}
901summary_info += {'Linux AIO support': config_host.has_key('CONFIG_LINUX_AIO')}
902summary_info += {'Linux io_uring support': config_host.has_key('CONFIG_LINUX_IO_URING')}
903summary_info += {'ATTR/XATTR support': config_host.has_key('CONFIG_ATTR')}
904summary_info += {'Install blobs': config_host.has_key('INSTALL_BLOBS')}
905# TODO: add back KVM/HAX/HVF/WHPX/TCG
906#summary_info += {'KVM support': have_kvm'}
907#summary_info += {'HAX support': have_hax'}
908#summary_info += {'HVF support': have_hvf'}
909#summary_info += {'WHPX support': have_whpx'}
910#summary_info += {'TCG support': have_tcg'}
911#if get_option('tcg')
912# summary_info += {'TCG debug enabled': config_host.has_key('CONFIG_DEBUG_TCG')}
913# summary_info += {'TCG interpreter': config_host.has_key('CONFIG_TCG_INTERPRETER')}
914#endif
915summary_info += {'malloc trim support': config_host.has_key('CONFIG_MALLOC_TRIM')}
916summary_info += {'RDMA support': config_host.has_key('CONFIG_RDMA')}
917summary_info += {'PVRDMA support': config_host.has_key('CONFIG_PVRDMA')}
918summary_info += {'fdt support': config_host.has_key('CONFIG_FDT')}
919summary_info += {'membarrier': config_host.has_key('CONFIG_MEMBARRIER')}
920summary_info += {'preadv support': config_host.has_key('CONFIG_PREADV')}
921summary_info += {'fdatasync': config_host.has_key('CONFIG_FDATASYNC')}
922summary_info += {'madvise': config_host.has_key('CONFIG_MADVISE')}
923summary_info += {'posix_madvise': config_host.has_key('CONFIG_POSIX_MADVISE')}
924summary_info += {'posix_memalign': config_host.has_key('CONFIG_POSIX_MEMALIGN')}
925summary_info += {'libcap-ng support': config_host.has_key('CONFIG_LIBCAP_NG')}
926summary_info += {'vhost-net support': config_host.has_key('CONFIG_VHOST_NET')}
927summary_info += {'vhost-crypto support': config_host.has_key('CONFIG_VHOST_CRYPTO')}
928summary_info += {'vhost-scsi support': config_host.has_key('CONFIG_VHOST_SCSI')}
929summary_info += {'vhost-vsock support': config_host.has_key('CONFIG_VHOST_VSOCK')}
930summary_info += {'vhost-user support': config_host.has_key('CONFIG_VHOST_KERNEL')}
931summary_info += {'vhost-user-fs support': config_host.has_key('CONFIG_VHOST_USER_FS')}
932summary_info += {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST_VDPA')}
933summary_info += {'Trace backends': config_host['TRACE_BACKENDS']}
934if config_host['TRACE_BACKENDS'].split().contains('simple')
935 summary_info += {'Trace output file': config_host['CONFIG_TRACE_FILE'] + '-<pid>'}
936endif
937# TODO: add back protocol and server version
938summary_info += {'spice support': config_host.has_key('CONFIG_SPICE')}
939summary_info += {'rbd support': config_host.has_key('CONFIG_RBD')}
940summary_info += {'xfsctl support': config_host.has_key('CONFIG_XFS')}
941summary_info += {'smartcard support': config_host.has_key('CONFIG_SMARTCARD')}
942summary_info += {'libusb': config_host.has_key('CONFIG_USB_LIBUSB')}
943summary_info += {'usb net redir': config_host.has_key('CONFIG_USB_REDIR')}
944summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')}
945summary_info += {'OpenGL dmabufs': config_host.has_key('CONFIG_OPENGL_DMABUF')}
946summary_info += {'libiscsi support': config_host.has_key('CONFIG_LIBISCSI')}
947summary_info += {'libnfs support': config_host.has_key('CONFIG_LIBNFS')}
948summary_info += {'build guest agent': config_host.has_key('CONFIG_GUEST_AGENT')}
949if targetos == 'windows'
950 if 'WIN_SDK' in config_host
951 summary_info += {'Windows SDK': config_host['WIN_SDK']}
952 endif
953 summary_info += {'QGA VSS support': config_host.has_key('CONFIG_QGA_VSS')}
954 summary_info += {'QGA w32 disk info': config_host.has_key('CONFIG_QGA_NTDDSCSI')}
955 summary_info += {'QGA MSI support': config_host.has_key('CONFIG_QGA_MSI_ENABLED')}
956endif
957summary_info += {'seccomp support': config_host.has_key('CONFIG_SECCOMP')}
958summary_info += {'coroutine backend': config_host['CONFIG_COROUTINE_BACKEND']}
959summary_info += {'coroutine pool': config_host['CONFIG_COROUTINE_POOL'] == '1'}
960summary_info += {'debug stack usage': config_host.has_key('CONFIG_DEBUG_STACK_USAGE')}
961summary_info += {'mutex debugging': config_host.has_key('CONFIG_DEBUG_MUTEX')}
962summary_info += {'crypto afalg': config_host.has_key('CONFIG_AF_ALG')}
963summary_info += {'GlusterFS support': config_host.has_key('CONFIG_GLUSTERFS')}
Marc-André Lureaubf0e56a2019-10-04 17:35:16 +0400964summary_info += {'gcov': get_option('b_coverage')}
Paolo Bonzinif9332752020-02-03 13:28:38 +0100965summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')}
966summary_info += {'libssh support': config_host.has_key('CONFIG_LIBSSH')}
967summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')}
968summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')}
969summary_info += {'lzo support': config_host.has_key('CONFIG_LZO')}
970summary_info += {'snappy support': config_host.has_key('CONFIG_SNAPPY')}
971summary_info += {'bzip2 support': config_host.has_key('CONFIG_BZIP2')}
972summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')}
973summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')}
974summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')}
975summary_info += {'libxml2': config_host.has_key('CONFIG_LIBXML2')}
976summary_info += {'tcmalloc support': config_host.has_key('CONFIG_TCMALLOC')}
977summary_info += {'jemalloc support': config_host.has_key('CONFIG_JEMALLOC')}
978summary_info += {'avx2 optimization': config_host.has_key('CONFIG_AVX2_OPT')}
979summary_info += {'avx512f optimization': config_host.has_key('CONFIG_AVX512F_OPT')}
980summary_info += {'replication support': config_host.has_key('CONFIG_REPLICATION')}
981summary_info += {'bochs support': config_host.has_key('CONFIG_BOCHS')}
982summary_info += {'cloop support': config_host.has_key('CONFIG_CLOOP')}
983summary_info += {'dmg support': config_host.has_key('CONFIG_DMG')}
984summary_info += {'qcow v1 support': config_host.has_key('CONFIG_QCOW1')}
985summary_info += {'vdi support': config_host.has_key('CONFIG_VDI')}
986summary_info += {'vvfat support': config_host.has_key('CONFIG_VVFAT')}
987summary_info += {'qed support': config_host.has_key('CONFIG_QED')}
988summary_info += {'parallels support': config_host.has_key('CONFIG_PARALLELS')}
989summary_info += {'sheepdog support': config_host.has_key('CONFIG_SHEEPDOG')}
990summary_info += {'capstone': config_host.has_key('CONFIG_CAPSTONE')}
991summary_info += {'libpmem support': config_host.has_key('CONFIG_LIBPMEM')}
992summary_info += {'libdaxctl support': config_host.has_key('CONFIG_LIBDAXCTL')}
993summary_info += {'libudev': config_host.has_key('CONFIG_LIBUDEV')}
994summary_info += {'default devices': config_host['CONFIG_MINIKCONF_MODE'] == '--defconfig'}
995summary_info += {'plugin support': config_host.has_key('CONFIG_PLUGIN')}
996summary_info += {'fuzzing support': config_host.has_key('CONFIG_FUZZ')}
997if config_host.has_key('HAVE_GDB_BIN')
998 summary_info += {'gdb': config_host['HAVE_GDB_BIN']}
999endif
1000summary_info += {'thread sanitizer': config_host.has_key('CONFIG_TSAN')}
1001summary_info += {'rng-none': config_host.has_key('CONFIG_RNG_NONE')}
1002summary_info += {'Linux keyring': config_host.has_key('CONFIG_SECRET_KEYRING')}
1003summary(summary_info, bool_yn: true)
1004
1005if not supported_cpus.contains(cpu)
1006 message()
1007 warning('SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!')
1008 message()
1009 message('CPU host architecture ' + cpu + ' support is not currently maintained.')
1010 message('The QEMU project intends to remove support for this host CPU in')
1011 message('a future release if nobody volunteers to maintain it and to')
1012 message('provide a build host for our continuous integration setup.')
1013 message('configure has succeeded and you can continue to build, but')
1014 message('if you care about QEMU on this platform you should contact')
1015 message('us upstream at qemu-devel@nongnu.org.')
1016endif
1017
1018if not supported_oses.contains(targetos)
1019 message()
1020 warning('WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASES!')
1021 message()
1022 message('Host OS ' + targetos + 'support is not currently maintained.')
1023 message('The QEMU project intends to remove support for this host OS in')
1024 message('a future release if nobody volunteers to maintain it and to')
1025 message('provide a build host for our continuous integration setup.')
1026 message('configure has succeeded and you can continue to build, but')
1027 message('if you care about QEMU on this platform you should contact')
1028 message('us upstream at qemu-devel@nongnu.org.')
1029endif