Paolo Bonzini | a566505 | 2019-06-10 12:05:14 +0200 | [diff] [blame] | 1 | project('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 | |
| 5 | not_found = dependency('', required: false) |
| 6 | keyval = import('unstable-keyval') |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 7 | ss = import('sourceset') |
| 8 | |
Paolo Bonzini | ce1c1e7 | 2020-01-28 16:41:44 +0100 | [diff] [blame] | 9 | sh = find_program('sh') |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 10 | cc = meson.get_compiler('c') |
Paolo Bonzini | a566505 | 2019-06-10 12:05:14 +0200 | [diff] [blame] | 11 | config_host = keyval.load(meson.current_build_dir() / 'config-host.mak') |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 12 | config_all_disas = keyval.load(meson.current_build_dir() / 'config-all-disas.mak') |
Marc-André Lureau | 3154fee | 2019-08-29 22:07:01 +0400 | [diff] [blame] | 13 | enable_modules = 'CONFIG_MODULES' in config_host |
Paolo Bonzini | 35be72b | 2020-02-06 14:17:15 +0100 | [diff] [blame] | 14 | enable_static = 'CONFIG_STATIC' in config_host |
Paolo Bonzini | f8aa24e | 2020-08-05 15:49:10 +0200 | [diff] [blame] | 15 | build_docs = 'BUILD_DOCS' in config_host |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 16 | config_host_data = configuration_data() |
| 17 | genh = [] |
Paolo Bonzini | a566505 | 2019-06-10 12:05:14 +0200 | [diff] [blame] | 18 | |
| 19 | add_project_arguments(config_host['QEMU_CFLAGS'].split(), |
| 20 | native: false, language: ['c', 'objc']) |
| 21 | add_project_arguments(config_host['QEMU_CXXFLAGS'].split(), |
| 22 | native: false, language: 'cpp') |
| 23 | add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(), |
| 24 | native: false, language: ['c', 'cpp', 'objc']) |
| 25 | add_project_arguments(config_host['QEMU_INCLUDES'].split(), |
| 26 | language: ['c', 'cpp', 'objc']) |
| 27 | |
Marc-André Lureau | fc92989 | 2019-07-13 01:47:54 +0400 | [diff] [blame] | 28 | python = import('python').find_installation() |
| 29 | |
| 30 | link_language = meson.get_external_property('link_language', 'cpp') |
| 31 | if link_language == 'cpp' |
| 32 | add_languages('cpp', required: true, native: false) |
| 33 | endif |
Paolo Bonzini | a566505 | 2019-06-10 12:05:14 +0200 | [diff] [blame] | 34 | if host_machine.system() == 'darwin' |
| 35 | add_languages('objc', required: false, native: false) |
| 36 | endif |
| 37 | |
Paolo Bonzini | 968b4db | 2020-02-03 14:45:33 +0100 | [diff] [blame] | 38 | if 'SPARSE_CFLAGS' in config_host |
| 39 | run_target('sparse', |
| 40 | command: [find_program('scripts/check_sparse.py'), |
| 41 | config_host['SPARSE_CFLAGS'].split(), |
| 42 | 'compile_commands.json']) |
| 43 | endif |
| 44 | |
Paolo Bonzini | a566505 | 2019-06-10 12:05:14 +0200 | [diff] [blame] | 45 | configure_file(input: files('scripts/ninjatool.py'), |
| 46 | output: 'ninjatool', |
| 47 | configuration: config_host) |
Paolo Bonzini | f933275 | 2020-02-03 13:28:38 +0100 | [diff] [blame] | 48 | |
| 49 | supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux'] |
| 50 | supported_cpus = ['ppc', 'ppc64', 's390x', 'sparc64', 'riscv32', 'riscv64', 'x86', 'x86_64', |
| 51 | 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64'] |
| 52 | |
| 53 | cpu = host_machine.cpu_family() |
| 54 | targetos = host_machine.system() |
| 55 | |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 56 | m = cc.find_library('m', required: false) |
| 57 | util = cc.find_library('util', required: false) |
Paolo Bonzini | 4a96337 | 2020-08-03 16:22:28 +0200 | [diff] [blame] | 58 | winmm = [] |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 59 | socket = [] |
Marc-André Lureau | 04c6f1e | 2019-07-18 00:31:05 +0400 | [diff] [blame] | 60 | version_res = [] |
Marc-André Lureau | d92989a | 2019-08-20 19:48:59 +0400 | [diff] [blame] | 61 | coref = [] |
| 62 | iokit = [] |
| 63 | cocoa = [] |
| 64 | hvf = [] |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 65 | if targetos == 'windows' |
| 66 | socket = cc.find_library('ws2_32') |
Paolo Bonzini | 4a96337 | 2020-08-03 16:22:28 +0200 | [diff] [blame] | 67 | winmm = cc.find_library('winmm') |
Marc-André Lureau | 04c6f1e | 2019-07-18 00:31:05 +0400 | [diff] [blame] | 68 | |
| 69 | win = import('windows') |
| 70 | version_res = win.compile_resources('version.rc', |
| 71 | depend_files: files('pc-bios/qemu-nsis.ico'), |
| 72 | include_directories: include_directories('.')) |
Marc-André Lureau | d92989a | 2019-08-20 19:48:59 +0400 | [diff] [blame] | 73 | elif targetos == 'darwin' |
| 74 | coref = dependency('appleframeworks', modules: 'CoreFoundation') |
| 75 | iokit = dependency('appleframeworks', modules: 'IOKit') |
| 76 | cocoa = dependency('appleframeworks', modules: 'Cocoa') |
| 77 | hvf = dependency('appleframeworks', modules: 'Hypervisor') |
Paolo Bonzini | cfad62f | 2020-08-09 23:47:45 +0200 | [diff] [blame] | 78 | elif targetos == 'sunos' |
| 79 | socket = [cc.find_library('socket'), |
| 80 | cc.find_library('nsl'), |
| 81 | cc.find_library('resolv')] |
| 82 | elif targetos == 'haiku' |
| 83 | socket = [cc.find_library('posix_error_mapper'), |
| 84 | cc.find_library('network'), |
| 85 | cc.find_library('bsd')] |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 86 | endif |
| 87 | glib = declare_dependency(compile_args: config_host['GLIB_CFLAGS'].split(), |
| 88 | link_args: config_host['GLIB_LIBS'].split()) |
| 89 | gio = not_found |
| 90 | if 'CONFIG_GIO' in config_host |
| 91 | gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), |
| 92 | link_args: config_host['GIO_LIBS'].split()) |
| 93 | endif |
| 94 | lttng = not_found |
| 95 | if 'CONFIG_TRACE_UST' in config_host |
| 96 | lttng = declare_dependency(link_args: config_host['LTTNG_UST_LIBS'].split()) |
| 97 | endif |
| 98 | urcubp = not_found |
| 99 | if 'CONFIG_TRACE_UST' in config_host |
| 100 | urcubp = declare_dependency(link_args: config_host['URCU_BP_LIBS'].split()) |
| 101 | endif |
| 102 | nettle = not_found |
| 103 | if 'CONFIG_NETTLE' in config_host |
| 104 | nettle = declare_dependency(compile_args: config_host['NETTLE_CFLAGS'].split(), |
| 105 | link_args: config_host['NETTLE_LIBS'].split()) |
| 106 | endif |
| 107 | gnutls = not_found |
| 108 | if 'CONFIG_GNUTLS' in config_host |
| 109 | gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(), |
| 110 | link_args: config_host['GNUTLS_LIBS'].split()) |
| 111 | endif |
Marc-André Lureau | ea45896 | 2019-07-12 22:23:46 +0400 | [diff] [blame] | 112 | pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(), |
| 113 | link_args: config_host['PIXMAN_LIBS'].split()) |
Marc-André Lureau | 5e7fbd2 | 2019-07-15 22:54:34 +0400 | [diff] [blame] | 114 | pam = not_found |
| 115 | if 'CONFIG_AUTH_PAM' in config_host |
| 116 | pam = cc.find_library('pam') |
| 117 | endif |
Marc-André Lureau | 5e5733e | 2019-08-29 22:34:43 +0400 | [diff] [blame] | 118 | libaio = cc.find_library('aio', required: false) |
| 119 | zlib = not_found |
| 120 | if 'CONFIG_ZLIB' in config_host |
| 121 | zlib = declare_dependency(compile_args: config_host['ZLIB_CFLAGS'].split(), |
| 122 | link_args: config_host['ZLIB_LIBS'].split()) |
| 123 | endif |
| 124 | linux_io_uring = not_found |
| 125 | if 'CONFIG_LINUX_IO_URING' in config_host |
| 126 | linux_io_uring = declare_dependency(compile_args: config_host['LINUX_IO_URING_CFLAGS'].split(), |
| 127 | link_args: config_host['LINUX_IO_URING_LIBS'].split()) |
| 128 | endif |
| 129 | libxml2 = not_found |
| 130 | if 'CONFIG_LIBXML2' in config_host |
| 131 | libxml2 = declare_dependency(compile_args: config_host['LIBXML2_CFLAGS'].split(), |
| 132 | link_args: config_host['LIBXML2_LIBS'].split()) |
| 133 | endif |
| 134 | libnfs = not_found |
| 135 | if 'CONFIG_LIBNFS' in config_host |
| 136 | libnfs = declare_dependency(link_args: config_host['LIBNFS_LIBS'].split()) |
| 137 | endif |
Marc-André Lureau | ec0d589 | 2019-07-15 15:04:49 +0400 | [diff] [blame] | 138 | libattr = not_found |
| 139 | if 'CONFIG_ATTR' in config_host |
| 140 | libattr = declare_dependency(link_args: config_host['LIBATTR_LIBS'].split()) |
| 141 | endif |
Paolo Bonzini | 3f99cf5 | 2020-02-05 09:45:39 +0100 | [diff] [blame] | 142 | seccomp = not_found |
| 143 | if 'CONFIG_SECCOMP' in config_host |
| 144 | seccomp = declare_dependency(compile_args: config_host['SECCOMP_CFLAGS'].split(), |
| 145 | link_args: config_host['SECCOMP_LIBS'].split()) |
| 146 | endif |
| 147 | libcap_ng = not_found |
| 148 | if 'CONFIG_LIBCAP_NG' in config_host |
| 149 | libcap_ng = declare_dependency(link_args: config_host['LIBCAP_NG_LIBS'].split()) |
| 150 | endif |
Marc-André Lureau | ade60d4 | 2019-07-15 14:48:31 +0400 | [diff] [blame] | 151 | xkbcommon = not_found |
| 152 | if 'CONFIG_XKBCOMMON' in config_host |
| 153 | xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(), |
| 154 | link_args: config_host['XKBCOMMON_LIBS'].split()) |
| 155 | endif |
Marc-André Lureau | cdaf072 | 2019-07-22 23:47:50 +0400 | [diff] [blame] | 156 | slirp = not_found |
| 157 | if config_host.has_key('CONFIG_SLIRP') |
| 158 | slirp = declare_dependency(compile_args: config_host['SLIRP_CFLAGS'].split(), |
| 159 | link_args: config_host['SLIRP_LIBS'].split()) |
| 160 | endif |
| 161 | vde = not_found |
| 162 | if config_host.has_key('CONFIG_VDE') |
| 163 | vde = declare_dependency(link_args: config_host['VDE_LIBS'].split()) |
| 164 | endif |
Paolo Bonzini | 478e943 | 2020-08-17 12:47:55 +0200 | [diff] [blame] | 165 | pulse = not_found |
| 166 | if 'CONFIG_LIBPULSE' in config_host |
| 167 | pulse = declare_dependency(compile_args: config_host['PULSE_CFLAGS'].split(), |
| 168 | link_args: config_host['PULSE_LIBS'].split()) |
| 169 | endif |
| 170 | alsa = not_found |
| 171 | if 'CONFIG_ALSA' in config_host |
| 172 | alsa = declare_dependency(compile_args: config_host['ALSA_CFLAGS'].split(), |
| 173 | link_args: config_host['ALSA_LIBS'].split()) |
| 174 | endif |
| 175 | jack = not_found |
| 176 | if 'CONFIG_LIBJACK' in config_host |
| 177 | jack = declare_dependency(link_args: config_host['JACK_LIBS'].split()) |
| 178 | endif |
Paolo Bonzini | 2634733 | 2019-07-29 15:40:07 +0200 | [diff] [blame] | 179 | spice = not_found |
| 180 | if 'CONFIG_SPICE' in config_host |
| 181 | spice = declare_dependency(compile_args: config_host['SPICE_CFLAGS'].split(), |
| 182 | link_args: config_host['SPICE_LIBS'].split()) |
| 183 | endif |
Marc-André Lureau | 5ee24e7 | 2019-07-12 23:16:54 +0400 | [diff] [blame] | 184 | rt = cc.find_library('rt', required: false) |
Marc-André Lureau | 897b5af | 2019-07-16 21:54:15 +0400 | [diff] [blame] | 185 | libmpathpersist = not_found |
| 186 | if config_host.has_key('CONFIG_MPATH') |
| 187 | libmpathpersist = cc.find_library('mpathpersist') |
| 188 | endif |
Paolo Bonzini | 99650b6 | 2019-06-10 12:21:14 +0200 | [diff] [blame] | 189 | libiscsi = not_found |
| 190 | if 'CONFIG_LIBISCSI' in config_host |
| 191 | libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(), |
| 192 | link_args: config_host['LIBISCSI_LIBS'].split()) |
| 193 | endif |
Marc-André Lureau | 5e5733e | 2019-08-29 22:34:43 +0400 | [diff] [blame] | 194 | zstd = not_found |
| 195 | if 'CONFIG_ZSTD' in config_host |
| 196 | zstd = declare_dependency(compile_args: config_host['ZSTD_CFLAGS'].split(), |
| 197 | link_args: config_host['ZSTD_LIBS'].split()) |
| 198 | endif |
Marc-André Lureau | ea45896 | 2019-07-12 22:23:46 +0400 | [diff] [blame] | 199 | gbm = not_found |
| 200 | if 'CONFIG_GBM' in config_host |
| 201 | gbm = declare_dependency(compile_args: config_host['GBM_CFLAGS'].split(), |
| 202 | link_args: config_host['GBM_LIBS'].split()) |
| 203 | endif |
| 204 | virgl = not_found |
| 205 | if 'CONFIG_VIRGL' in config_host |
| 206 | virgl = declare_dependency(compile_args: config_host['VIRGL_CFLAGS'].split(), |
| 207 | link_args: config_host['VIRGL_LIBS'].split()) |
| 208 | endif |
Marc-André Lureau | 1d7bb6a | 2019-07-12 23:47:06 +0400 | [diff] [blame] | 209 | curl = not_found |
| 210 | if 'CONFIG_CURL' in config_host |
| 211 | curl = declare_dependency(compile_args: config_host['CURL_CFLAGS'].split(), |
| 212 | link_args: config_host['CURL_LIBS'].split()) |
| 213 | endif |
Paolo Bonzini | f15bff2 | 2019-07-18 13:19:02 +0200 | [diff] [blame] | 214 | libudev = not_found |
| 215 | if 'CONFIG_LIBUDEV' in config_host |
| 216 | libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split()) |
| 217 | endif |
Paolo Bonzini | 2634733 | 2019-07-29 15:40:07 +0200 | [diff] [blame] | 218 | brlapi = not_found |
| 219 | if 'CONFIG_BRLAPI' in config_host |
| 220 | brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split()) |
| 221 | endif |
Paolo Bonzini | 35be72b | 2020-02-06 14:17:15 +0100 | [diff] [blame] | 222 | |
| 223 | sdl = dependency('sdl2', required: get_option('sdl'), static: enable_static, |
| 224 | include_type: 'system') |
| 225 | sdl_image = not_found |
| 226 | if sdl.found() |
| 227 | # work around 2.0.8 bug |
| 228 | sdl = declare_dependency(compile_args: '-Wno-undef', |
| 229 | dependencies: sdl) |
| 230 | sdl_image = dependency('sdl-image', required: get_option('sdl_image'), |
| 231 | static: enable_static) |
| 232 | else |
| 233 | if get_option('sdl_image').enabled() |
| 234 | error('sdl-image required, but SDL was @0@', |
| 235 | get_option('sdl').disabled() ? 'disabled' : 'not found') |
| 236 | endif |
| 237 | sdl_image = not_found |
Paolo Bonzini | 2634733 | 2019-07-29 15:40:07 +0200 | [diff] [blame] | 238 | endif |
Paolo Bonzini | 35be72b | 2020-02-06 14:17:15 +0100 | [diff] [blame] | 239 | |
Marc-André Lureau | 5e5733e | 2019-08-29 22:34:43 +0400 | [diff] [blame] | 240 | rbd = not_found |
| 241 | if 'CONFIG_RBD' in config_host |
| 242 | rbd = declare_dependency(link_args: config_host['RBD_LIBS'].split()) |
| 243 | endif |
| 244 | glusterfs = not_found |
| 245 | if 'CONFIG_GLUSTERFS' in config_host |
| 246 | glusterfs = declare_dependency(compile_args: config_host['GLUSTERFS_CFLAGS'].split(), |
| 247 | link_args: config_host['GLUSTERFS_LIBS'].split()) |
| 248 | endif |
| 249 | libssh = not_found |
| 250 | if 'CONFIG_LIBSSH' in config_host |
| 251 | libssh = declare_dependency(compile_args: config_host['LIBSSH_CFLAGS'].split(), |
| 252 | link_args: config_host['LIBSSH_LIBS'].split()) |
| 253 | endif |
| 254 | libbzip2 = not_found |
| 255 | if 'CONFIG_BZIP2' in config_host |
| 256 | libbzip2 = declare_dependency(link_args: config_host['BZIP2_LIBS'].split()) |
| 257 | endif |
| 258 | liblzfse = not_found |
| 259 | if 'CONFIG_LZFSE' in config_host |
| 260 | liblzfse = declare_dependency(link_args: config_host['LZFSE_LIBS'].split()) |
| 261 | endif |
Paolo Bonzini | 478e943 | 2020-08-17 12:47:55 +0200 | [diff] [blame] | 262 | oss = not_found |
| 263 | if 'CONFIG_AUDIO_OSS' in config_host |
| 264 | oss = declare_dependency(link_args: config_host['OSS_LIBS'].split()) |
| 265 | endif |
| 266 | dsound = not_found |
| 267 | if 'CONFIG_AUDIO_DSOUND' in config_host |
| 268 | dsound = declare_dependency(link_args: config_host['DSOUND_LIBS'].split()) |
| 269 | endif |
| 270 | coreaudio = not_found |
| 271 | if 'CONFIG_AUDIO_COREAUDIO' in config_host |
| 272 | coreaudio = declare_dependency(link_args: config_host['COREAUDIO_LIBS'].split()) |
| 273 | endif |
Marc-André Lureau | 2b1ccdf | 2019-07-16 23:21:02 +0400 | [diff] [blame] | 274 | opengl = not_found |
| 275 | if 'CONFIG_OPENGL' in config_host |
| 276 | opengl = declare_dependency(link_args: config_host['OPENGL_LIBS'].split()) |
| 277 | else |
| 278 | endif |
| 279 | gtk = not_found |
| 280 | if 'CONFIG_GTK' in config_host |
| 281 | gtk = declare_dependency(compile_args: config_host['GTK_CFLAGS'].split(), |
| 282 | link_args: config_host['GTK_LIBS'].split()) |
| 283 | endif |
| 284 | vte = not_found |
| 285 | if 'CONFIG_VTE' in config_host |
| 286 | vte = declare_dependency(compile_args: config_host['VTE_CFLAGS'].split(), |
| 287 | link_args: config_host['VTE_LIBS'].split()) |
| 288 | endif |
| 289 | x11 = not_found |
| 290 | if 'CONFIG_X11' in config_host |
| 291 | x11 = declare_dependency(compile_args: config_host['X11_CFLAGS'].split(), |
| 292 | link_args: config_host['X11_LIBS'].split()) |
| 293 | endif |
| 294 | curses = not_found |
| 295 | if 'CONFIG_CURSES' in config_host |
| 296 | curses = declare_dependency(compile_args: config_host['CURSES_CFLAGS'].split(), |
| 297 | link_args: config_host['CURSES_LIBS'].split()) |
| 298 | endif |
| 299 | iconv = not_found |
| 300 | if 'CONFIG_ICONV' in config_host |
| 301 | iconv = declare_dependency(compile_args: config_host['ICONV_CFLAGS'].split(), |
| 302 | link_args: config_host['ICONV_LIBS'].split()) |
| 303 | endif |
| 304 | gio = not_found |
| 305 | if 'CONFIG_GIO' in config_host |
| 306 | gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), |
| 307 | link_args: config_host['GIO_LIBS'].split()) |
| 308 | endif |
Paolo Bonzini | a0b9323 | 2020-02-06 15:48:52 +0100 | [diff] [blame] | 309 | vnc = not_found |
Marc-André Lureau | 2b1ccdf | 2019-07-16 23:21:02 +0400 | [diff] [blame] | 310 | png = not_found |
Marc-André Lureau | 2b1ccdf | 2019-07-16 23:21:02 +0400 | [diff] [blame] | 311 | jpeg = not_found |
Marc-André Lureau | 2b1ccdf | 2019-07-16 23:21:02 +0400 | [diff] [blame] | 312 | sasl = not_found |
Paolo Bonzini | a0b9323 | 2020-02-06 15:48:52 +0100 | [diff] [blame] | 313 | if get_option('vnc').enabled() |
| 314 | vnc = declare_dependency() # dummy dependency |
| 315 | png = dependency('libpng', required: get_option('vnc_png'), |
| 316 | static: enable_static) |
| 317 | jpeg = cc.find_library('jpeg', has_headers: ['jpeglib.h'], |
| 318 | required: get_option('vnc_jpeg'), |
| 319 | static: enable_static) |
| 320 | sasl = cc.find_library('sasl2', has_headers: ['sasl/sasl.h'], |
| 321 | required: get_option('vnc_sasl'), |
| 322 | static: enable_static) |
| 323 | if sasl.found() |
| 324 | sasl = declare_dependency(dependencies: sasl, |
| 325 | compile_args: '-DSTRUCT_IOVEC_DEFINED') |
| 326 | endif |
Marc-André Lureau | 2b1ccdf | 2019-07-16 23:21:02 +0400 | [diff] [blame] | 327 | endif |
Paolo Bonzini | 4a96337 | 2020-08-03 16:22:28 +0200 | [diff] [blame] | 328 | fdt = not_found |
| 329 | if 'CONFIG_FDT' in config_host |
| 330 | fdt = declare_dependency(compile_args: config_host['FDT_CFLAGS'].split(), |
| 331 | link_args: config_host['FDT_LIBS'].split()) |
| 332 | endif |
Marc-André Lureau | 708eab4 | 2019-09-03 16:59:33 +0400 | [diff] [blame] | 333 | snappy = not_found |
| 334 | if 'CONFIG_SNAPPY' in config_host |
| 335 | snappy = declare_dependency(link_args: config_host['SNAPPY_LIBS'].split()) |
| 336 | endif |
| 337 | lzo = not_found |
| 338 | if 'CONFIG_LZO' in config_host |
| 339 | lzo = declare_dependency(link_args: config_host['LZO_LIBS'].split()) |
| 340 | endif |
Marc-André Lureau | 5516623 | 2019-07-24 19:16:22 +0400 | [diff] [blame] | 341 | rdma = not_found |
| 342 | if 'CONFIG_RDMA' in config_host |
| 343 | rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split()) |
| 344 | endif |
Marc-André Lureau | ab31805 | 2019-07-24 19:23:16 +0400 | [diff] [blame] | 345 | numa = not_found |
| 346 | if 'CONFIG_NUMA' in config_host |
| 347 | numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split()) |
| 348 | endif |
Marc-André Lureau | 582ea95 | 2019-08-15 15:15:32 +0400 | [diff] [blame] | 349 | xen = not_found |
| 350 | if 'CONFIG_XEN_BACKEND' in config_host |
| 351 | xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(), |
| 352 | link_args: config_host['XEN_LIBS'].split()) |
| 353 | endif |
Paolo Bonzini | 06677ce | 2020-08-06 13:07:39 +0200 | [diff] [blame] | 354 | cacard = not_found |
| 355 | if 'CONFIG_SMARTCARD' in config_host |
| 356 | cacard = declare_dependency(compile_args: config_host['SMARTCARD_CFLAGS'].split(), |
| 357 | link_args: config_host['SMARTCARD_LIBS'].split()) |
| 358 | endif |
| 359 | usbredir = not_found |
| 360 | if 'CONFIG_USB_REDIR' in config_host |
| 361 | usbredir = declare_dependency(compile_args: config_host['USB_REDIR_CFLAGS'].split(), |
| 362 | link_args: config_host['USB_REDIR_LIBS'].split()) |
| 363 | endif |
| 364 | libusb = not_found |
| 365 | if 'CONFIG_USB_LIBUSB' in config_host |
| 366 | libusb = declare_dependency(compile_args: config_host['LIBUSB_CFLAGS'].split(), |
| 367 | link_args: config_host['LIBUSB_LIBS'].split()) |
| 368 | endif |
Marc-André Lureau | c9322ab | 2019-08-18 19:51:17 +0400 | [diff] [blame] | 369 | capstone = not_found |
| 370 | if 'CONFIG_CAPSTONE' in config_host |
| 371 | capstone = declare_dependency(compile_args: config_host['CAPSTONE_CFLAGS'].split(), |
| 372 | link_args: config_host['CAPSTONE_LIBS'].split()) |
| 373 | endif |
| 374 | libpmem = not_found |
| 375 | if 'CONFIG_LIBPMEM' in config_host |
| 376 | libpmem = declare_dependency(compile_args: config_host['LIBPMEM_CFLAGS'].split(), |
| 377 | link_args: config_host['LIBPMEM_LIBS'].split()) |
| 378 | endif |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 379 | |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 380 | # Create config-host.h |
| 381 | |
Paolo Bonzini | 35be72b | 2020-02-06 14:17:15 +0100 | [diff] [blame] | 382 | config_host_data.set('CONFIG_SDL', sdl.found()) |
| 383 | config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) |
Paolo Bonzini | a0b9323 | 2020-02-06 15:48:52 +0100 | [diff] [blame] | 384 | config_host_data.set('CONFIG_VNC', vnc.found()) |
| 385 | config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) |
| 386 | config_host_data.set('CONFIG_VNC_PNG', png.found()) |
| 387 | config_host_data.set('CONFIG_VNC_SASL', sasl.found()) |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 388 | config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version())) |
| 389 | config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]) |
| 390 | config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) |
| 391 | config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) |
| 392 | |
| 393 | arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] |
| 394 | strings = ['HOST_DSOSUF', 'CONFIG_IASL', 'qemu_confdir', 'qemu_datadir', |
| 395 | 'qemu_moddir', 'qemu_localstatedir', 'qemu_helperdir', 'qemu_localedir', |
| 396 | 'qemu_icondir', 'qemu_desktopdir', 'qemu_firmwarepath'] |
| 397 | foreach k, v: config_host |
| 398 | if arrays.contains(k) |
| 399 | if v != '' |
| 400 | v = '"' + '", "'.join(v.split()) + '", ' |
| 401 | endif |
| 402 | config_host_data.set(k, v) |
| 403 | elif k == 'ARCH' |
| 404 | config_host_data.set('HOST_' + v.to_upper(), 1) |
| 405 | elif strings.contains(k) |
| 406 | if not k.startswith('CONFIG_') |
| 407 | k = 'CONFIG_' + k.to_upper() |
| 408 | endif |
| 409 | config_host_data.set_quoted(k, v) |
| 410 | elif k.startswith('CONFIG_') or k.startswith('HAVE_') or k.startswith('HOST_') |
| 411 | config_host_data.set(k, v == 'y' ? 1 : v) |
| 412 | endif |
| 413 | endforeach |
| 414 | genh += configure_file(output: 'config-host.h', configuration: config_host_data) |
| 415 | |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 416 | minikconf = find_program('scripts/minikconf.py') |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 417 | target_dirs = config_host['TARGET_DIRS'].split() |
| 418 | have_user = false |
| 419 | have_system = false |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 420 | config_devices_mak_list = [] |
| 421 | config_devices_h = {} |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 422 | config_target_h = {} |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 423 | config_target_mak = {} |
| 424 | kconfig_external_symbols = [ |
| 425 | 'CONFIG_KVM', |
| 426 | 'CONFIG_XEN', |
| 427 | 'CONFIG_TPM', |
| 428 | 'CONFIG_SPICE', |
| 429 | 'CONFIG_IVSHMEM', |
| 430 | 'CONFIG_OPENGL', |
| 431 | 'CONFIG_X11', |
| 432 | 'CONFIG_VHOST_USER', |
| 433 | 'CONFIG_VHOST_KERNEL', |
| 434 | 'CONFIG_VIRTFS', |
| 435 | 'CONFIG_LINUX', |
| 436 | 'CONFIG_PVRDMA', |
| 437 | ] |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 438 | ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS'] |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 439 | foreach target : target_dirs |
| 440 | have_user = have_user or target.endswith('-user') |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 441 | config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak') |
| 442 | |
| 443 | config_target_data = configuration_data() |
| 444 | foreach k, v: config_target |
| 445 | if not k.startswith('TARGET_') and not k.startswith('CONFIG_') |
| 446 | # do nothing |
| 447 | elif ignored.contains(k) |
| 448 | # do nothing |
| 449 | elif k == 'TARGET_BASE_ARCH' |
| 450 | config_target_data.set('TARGET_' + v.to_upper(), 1) |
| 451 | elif k == 'TARGET_NAME' |
| 452 | config_target_data.set_quoted(k, v) |
| 453 | elif v == 'y' |
| 454 | config_target_data.set(k, 1) |
| 455 | else |
| 456 | config_target_data.set(k, v) |
| 457 | endif |
| 458 | endforeach |
| 459 | config_target_h += {target: configure_file(output: target + '-config-target.h', |
| 460 | configuration: config_target_data)} |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 461 | |
| 462 | if target.endswith('-softmmu') |
| 463 | have_system = true |
| 464 | |
| 465 | base_kconfig = [] |
| 466 | foreach sym : kconfig_external_symbols |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 467 | if sym in config_target or sym in config_host |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 468 | base_kconfig += '@0@=y'.format(sym) |
| 469 | endif |
| 470 | endforeach |
| 471 | |
| 472 | config_devices_mak = target + '-config-devices.mak' |
| 473 | config_devices_mak = configure_file( |
| 474 | input: ['default-configs' / target + '.mak', 'Kconfig'], |
| 475 | output: config_devices_mak, |
| 476 | depfile: config_devices_mak + '.d', |
| 477 | capture: true, |
| 478 | command: [minikconf, config_host['CONFIG_MINIKCONF_MODE'], |
| 479 | config_devices_mak, '@DEPFILE@', '@INPUT@', |
| 480 | base_kconfig]) |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 481 | |
| 482 | config_devices_data = configuration_data() |
| 483 | config_devices = keyval.load(config_devices_mak) |
| 484 | foreach k, v: config_devices |
| 485 | config_devices_data.set(k, 1) |
| 486 | endforeach |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 487 | config_devices_mak_list += config_devices_mak |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 488 | config_devices_h += {target: configure_file(output: target + '-config-devices.h', |
| 489 | configuration: config_devices_data)} |
| 490 | config_target += config_devices |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 491 | endif |
| 492 | config_target_mak += {target: config_target} |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 493 | endforeach |
| 494 | have_tools = 'CONFIG_TOOLS' in config_host |
| 495 | have_block = have_system or have_tools |
| 496 | |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 497 | grepy = find_program('scripts/grepy.sh') |
| 498 | # This configuration is used to build files that are shared by |
| 499 | # multiple binaries, and then extracted out of the "common" |
| 500 | # static_library target. |
| 501 | # |
| 502 | # We do not use all_sources()/all_dependencies(), because it would |
| 503 | # build literally all source files, including devices only used by |
| 504 | # targets that are not built for this compilation. The CONFIG_ALL |
| 505 | # pseudo symbol replaces it. |
| 506 | |
| 507 | if have_system |
| 508 | config_all_devices_mak = configure_file( |
| 509 | output: 'config-all-devices.mak', |
| 510 | input: config_devices_mak_list, |
| 511 | capture: true, |
| 512 | command: [grepy, '@INPUT@'], |
| 513 | ) |
| 514 | config_all_devices = keyval.load(config_all_devices_mak) |
| 515 | else |
| 516 | config_all_devices = {} |
| 517 | endif |
| 518 | config_all = config_all_devices |
| 519 | config_all += config_host |
| 520 | config_all += config_all_disas |
| 521 | config_all += { |
| 522 | 'CONFIG_XEN': config_host.has_key('CONFIG_XEN_BACKEND'), |
| 523 | 'CONFIG_SOFTMMU': have_system, |
| 524 | 'CONFIG_USER_ONLY': have_user, |
| 525 | 'CONFIG_ALL': true, |
| 526 | } |
| 527 | |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 528 | # Generators |
| 529 | |
Marc-André Lureau | 3f88565 | 2019-07-15 18:06:04 +0400 | [diff] [blame] | 530 | hxtool = find_program('scripts/hxtool') |
Marc-André Lureau | 650b5d5 | 2019-07-15 17:36:47 +0400 | [diff] [blame] | 531 | shaderinclude = find_program('scripts/shaderinclude.pl') |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 532 | qapi_gen = find_program('scripts/qapi-gen.py') |
| 533 | qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py', |
| 534 | meson.source_root() / 'scripts/qapi/commands.py', |
| 535 | meson.source_root() / 'scripts/qapi/common.py', |
| 536 | meson.source_root() / 'scripts/qapi/doc.py', |
| 537 | meson.source_root() / 'scripts/qapi/error.py', |
| 538 | meson.source_root() / 'scripts/qapi/events.py', |
| 539 | meson.source_root() / 'scripts/qapi/expr.py', |
| 540 | meson.source_root() / 'scripts/qapi/gen.py', |
| 541 | meson.source_root() / 'scripts/qapi/introspect.py', |
| 542 | meson.source_root() / 'scripts/qapi/parser.py', |
| 543 | meson.source_root() / 'scripts/qapi/schema.py', |
| 544 | meson.source_root() / 'scripts/qapi/source.py', |
| 545 | meson.source_root() / 'scripts/qapi/types.py', |
| 546 | meson.source_root() / 'scripts/qapi/visit.py', |
| 547 | meson.source_root() / 'scripts/qapi/common.py', |
| 548 | meson.source_root() / 'scripts/qapi/doc.py', |
| 549 | meson.source_root() / 'scripts/qapi-gen.py' |
| 550 | ] |
| 551 | |
| 552 | tracetool = [ |
| 553 | python, files('scripts/tracetool.py'), |
| 554 | '--backend=' + config_host['TRACE_BACKENDS'] |
| 555 | ] |
| 556 | |
Marc-André Lureau | 2c273f3 | 2019-07-15 17:10:19 +0400 | [diff] [blame] | 557 | qemu_version_cmd = [find_program('scripts/qemu-version.sh'), |
| 558 | meson.current_source_dir(), |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 559 | config_host['PKGVERSION'], meson.project_version()] |
Marc-André Lureau | 2c273f3 | 2019-07-15 17:10:19 +0400 | [diff] [blame] | 560 | qemu_version = custom_target('qemu-version.h', |
| 561 | output: 'qemu-version.h', |
| 562 | command: qemu_version_cmd, |
| 563 | capture: true, |
| 564 | build_by_default: true, |
| 565 | build_always_stale: true) |
| 566 | genh += qemu_version |
| 567 | |
Marc-André Lureau | 3f88565 | 2019-07-15 18:06:04 +0400 | [diff] [blame] | 568 | hxdep = [] |
| 569 | hx_headers = [ |
| 570 | ['qemu-options.hx', 'qemu-options.def'], |
| 571 | ['qemu-img-cmds.hx', 'qemu-img-cmds.h'], |
| 572 | ] |
| 573 | if have_system |
| 574 | hx_headers += [ |
| 575 | ['hmp-commands.hx', 'hmp-commands.h'], |
| 576 | ['hmp-commands-info.hx', 'hmp-commands-info.h'], |
| 577 | ] |
| 578 | endif |
| 579 | foreach d : hx_headers |
Marc-André Lureau | b7c70bf | 2019-07-16 21:37:25 +0400 | [diff] [blame] | 580 | hxdep += custom_target(d[1], |
Marc-André Lureau | 3f88565 | 2019-07-15 18:06:04 +0400 | [diff] [blame] | 581 | input: files(d[0]), |
| 582 | output: d[1], |
| 583 | capture: true, |
| 584 | build_by_default: true, # to be removed when added to a target |
| 585 | command: [hxtool, '-h', '@INPUT0@']) |
| 586 | endforeach |
| 587 | genh += hxdep |
| 588 | |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 589 | # Collect sourcesets. |
| 590 | |
| 591 | util_ss = ss.source_set() |
| 592 | stub_ss = ss.source_set() |
| 593 | trace_ss = ss.source_set() |
Marc-André Lureau | 3154fee | 2019-08-29 22:07:01 +0400 | [diff] [blame] | 594 | block_ss = ss.source_set() |
Paolo Bonzini | 4a96337 | 2020-08-03 16:22:28 +0200 | [diff] [blame] | 595 | blockdev_ss = ss.source_set() |
Paolo Bonzini | ff219dc | 2020-08-04 21:14:26 +0200 | [diff] [blame] | 596 | qmp_ss = ss.source_set() |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 597 | common_ss = ss.source_set() |
| 598 | softmmu_ss = ss.source_set() |
| 599 | user_ss = ss.source_set() |
| 600 | bsd_user_ss = ss.source_set() |
| 601 | linux_user_ss = ss.source_set() |
| 602 | specific_ss = ss.source_set() |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 603 | specific_fuzz_ss = ss.source_set() |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 604 | |
Marc-André Lureau | 3154fee | 2019-08-29 22:07:01 +0400 | [diff] [blame] | 605 | modules = {} |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 606 | hw_arch = {} |
| 607 | target_arch = {} |
| 608 | target_softmmu_arch = {} |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 609 | |
| 610 | ############### |
| 611 | # Trace files # |
| 612 | ############### |
| 613 | |
Marc-André Lureau | c9322ab | 2019-08-18 19:51:17 +0400 | [diff] [blame] | 614 | # TODO: add each directory to the subdirs from its own meson.build, once |
| 615 | # we have those |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 616 | trace_events_subdirs = [ |
| 617 | 'accel/kvm', |
| 618 | 'accel/tcg', |
| 619 | 'crypto', |
| 620 | 'monitor', |
| 621 | ] |
| 622 | if have_user |
| 623 | trace_events_subdirs += [ 'linux-user' ] |
| 624 | endif |
| 625 | if have_block |
| 626 | trace_events_subdirs += [ |
| 627 | 'authz', |
| 628 | 'block', |
| 629 | 'io', |
| 630 | 'nbd', |
| 631 | 'scsi', |
| 632 | ] |
| 633 | endif |
| 634 | if have_system |
| 635 | trace_events_subdirs += [ |
| 636 | 'audio', |
| 637 | 'backends', |
| 638 | 'backends/tpm', |
| 639 | 'chardev', |
| 640 | 'hw/9pfs', |
| 641 | 'hw/acpi', |
| 642 | 'hw/alpha', |
| 643 | 'hw/arm', |
| 644 | 'hw/audio', |
| 645 | 'hw/block', |
| 646 | 'hw/block/dataplane', |
| 647 | 'hw/char', |
| 648 | 'hw/display', |
| 649 | 'hw/dma', |
| 650 | 'hw/hppa', |
| 651 | 'hw/hyperv', |
| 652 | 'hw/i2c', |
| 653 | 'hw/i386', |
| 654 | 'hw/i386/xen', |
| 655 | 'hw/ide', |
| 656 | 'hw/input', |
| 657 | 'hw/intc', |
| 658 | 'hw/isa', |
| 659 | 'hw/mem', |
| 660 | 'hw/mips', |
| 661 | 'hw/misc', |
| 662 | 'hw/misc/macio', |
| 663 | 'hw/net', |
| 664 | 'hw/nvram', |
| 665 | 'hw/pci', |
| 666 | 'hw/pci-host', |
| 667 | 'hw/ppc', |
| 668 | 'hw/rdma', |
| 669 | 'hw/rdma/vmw', |
| 670 | 'hw/rtc', |
| 671 | 'hw/s390x', |
| 672 | 'hw/scsi', |
| 673 | 'hw/sd', |
| 674 | 'hw/sparc', |
| 675 | 'hw/sparc64', |
| 676 | 'hw/ssi', |
| 677 | 'hw/timer', |
| 678 | 'hw/tpm', |
| 679 | 'hw/usb', |
| 680 | 'hw/vfio', |
| 681 | 'hw/virtio', |
| 682 | 'hw/watchdog', |
| 683 | 'hw/xen', |
| 684 | 'hw/gpio', |
| 685 | 'hw/riscv', |
| 686 | 'migration', |
| 687 | 'net', |
| 688 | 'ui', |
| 689 | ] |
| 690 | endif |
| 691 | trace_events_subdirs += [ |
| 692 | 'hw/core', |
| 693 | 'qapi', |
| 694 | 'qom', |
| 695 | 'target/arm', |
| 696 | 'target/hppa', |
| 697 | 'target/i386', |
| 698 | 'target/mips', |
| 699 | 'target/ppc', |
| 700 | 'target/riscv', |
| 701 | 'target/s390x', |
| 702 | 'target/sparc', |
| 703 | 'util', |
| 704 | ] |
| 705 | |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 706 | subdir('qapi') |
| 707 | subdir('qobject') |
| 708 | subdir('stubs') |
| 709 | subdir('trace') |
| 710 | subdir('util') |
Marc-André Lureau | 5582c58 | 2019-07-16 19:28:54 +0400 | [diff] [blame] | 711 | subdir('qom') |
| 712 | subdir('authz') |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 713 | subdir('crypto') |
Marc-André Lureau | 2d78b56 | 2019-07-15 16:00:36 +0400 | [diff] [blame] | 714 | subdir('ui') |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 715 | |
Marc-André Lureau | 3154fee | 2019-08-29 22:07:01 +0400 | [diff] [blame] | 716 | |
| 717 | if enable_modules |
| 718 | libmodulecommon = static_library('module-common', files('module-common.c') + genh, pic: true, c_args: '-DBUILD_DSO') |
| 719 | modulecommon = declare_dependency(link_whole: libmodulecommon, compile_args: '-DBUILD_DSO') |
| 720 | endif |
| 721 | |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 722 | # Build targets from sourcesets |
| 723 | |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 724 | stub_ss = stub_ss.apply(config_all, strict: false) |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 725 | |
| 726 | util_ss.add_all(trace_ss) |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 727 | util_ss = util_ss.apply(config_all, strict: false) |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 728 | libqemuutil = static_library('qemuutil', |
| 729 | sources: util_ss.sources() + stub_ss.sources() + genh, |
| 730 | dependencies: [util_ss.dependencies(), m, glib, socket]) |
| 731 | qemuutil = declare_dependency(link_with: libqemuutil, |
Marc-André Lureau | 04c6f1e | 2019-07-18 00:31:05 +0400 | [diff] [blame] | 732 | sources: genh + version_res) |
Paolo Bonzini | a81df1b | 2020-08-19 08:44:56 -0400 | [diff] [blame] | 733 | |
Paolo Bonzini | abff1ab | 2020-08-07 12:10:23 +0200 | [diff] [blame] | 734 | decodetree = generator(find_program('scripts/decodetree.py'), |
| 735 | output: 'decode-@BASENAME@.c.inc', |
| 736 | arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTPUT@']) |
| 737 | |
Paolo Bonzini | 478e943 | 2020-08-17 12:47:55 +0200 | [diff] [blame] | 738 | subdir('audio') |
Marc-André Lureau | 7fcfd45 | 2019-07-16 19:33:55 +0400 | [diff] [blame] | 739 | subdir('io') |
Marc-André Lureau | 848e8ff | 2019-07-15 23:18:07 +0400 | [diff] [blame] | 740 | subdir('chardev') |
Marc-André Lureau | ec0d589 | 2019-07-15 15:04:49 +0400 | [diff] [blame] | 741 | subdir('fsdev') |
Paolo Bonzini | abff1ab | 2020-08-07 12:10:23 +0200 | [diff] [blame] | 742 | subdir('libdecnumber') |
Marc-André Lureau | d3b1848 | 2019-08-17 14:55:32 +0400 | [diff] [blame] | 743 | subdir('target') |
Marc-André Lureau | 708eab4 | 2019-09-03 16:59:33 +0400 | [diff] [blame] | 744 | subdir('dump') |
Marc-André Lureau | ec0d589 | 2019-07-15 15:04:49 +0400 | [diff] [blame] | 745 | |
Marc-André Lureau | 5e5733e | 2019-08-29 22:34:43 +0400 | [diff] [blame] | 746 | block_ss.add(files( |
| 747 | 'block.c', |
| 748 | 'blockjob.c', |
| 749 | 'job.c', |
| 750 | 'qemu-io-cmds.c', |
| 751 | )) |
| 752 | block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c')) |
| 753 | |
| 754 | subdir('nbd') |
| 755 | subdir('scsi') |
| 756 | subdir('block') |
| 757 | |
Paolo Bonzini | 4a96337 | 2020-08-03 16:22:28 +0200 | [diff] [blame] | 758 | blockdev_ss.add(files( |
| 759 | 'blockdev.c', |
| 760 | 'blockdev-nbd.c', |
| 761 | 'iothread.c', |
| 762 | 'job-qmp.c', |
| 763 | )) |
| 764 | |
| 765 | # os-posix.c contains POSIX-specific functions used by qemu-storage-daemon, |
| 766 | # os-win32.c does not |
| 767 | blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c')) |
| 768 | softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')]) |
| 769 | |
| 770 | softmmu_ss.add_all(blockdev_ss) |
| 771 | softmmu_ss.add(files( |
| 772 | 'bootdevice.c', |
| 773 | 'dma-helpers.c', |
| 774 | 'qdev-monitor.c', |
| 775 | ), sdl) |
| 776 | |
| 777 | softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c')) |
| 778 | softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'), seccomp]) |
| 779 | softmmu_ss.add(when: ['CONFIG_FDT', fdt], if_true: [files('device_tree.c')]) |
| 780 | |
| 781 | common_ss.add(files('cpus-common.c')) |
| 782 | |
Paolo Bonzini | 5d3ea0e | 2020-08-06 13:40:26 +0200 | [diff] [blame] | 783 | subdir('softmmu') |
Marc-André Lureau | c9322ab | 2019-08-18 19:51:17 +0400 | [diff] [blame] | 784 | |
| 785 | specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone, libpmem) |
| 786 | specific_ss.add(files('exec-vary.c')) |
| 787 | specific_ss.add(when: 'CONFIG_TCG', if_true: files( |
| 788 | 'fpu/softfloat.c', |
| 789 | 'tcg/optimize.c', |
| 790 | 'tcg/tcg-common.c', |
| 791 | 'tcg/tcg-op-gvec.c', |
| 792 | 'tcg/tcg-op-vec.c', |
| 793 | 'tcg/tcg-op.c', |
| 794 | 'tcg/tcg.c', |
| 795 | )) |
| 796 | specific_ss.add(when: 'CONFIG_TCG_INTERPRETER', if_true: files('disas/tci.c', 'tcg/tci.c')) |
| 797 | |
Marc-André Lureau | ab31805 | 2019-07-24 19:23:16 +0400 | [diff] [blame] | 798 | subdir('backends') |
Marc-André Lureau | c574e16 | 2019-07-26 12:02:31 +0400 | [diff] [blame] | 799 | subdir('disas') |
Marc-André Lureau | 5516623 | 2019-07-24 19:16:22 +0400 | [diff] [blame] | 800 | subdir('migration') |
Paolo Bonzini | ff219dc | 2020-08-04 21:14:26 +0200 | [diff] [blame] | 801 | subdir('monitor') |
Marc-André Lureau | cdaf072 | 2019-07-22 23:47:50 +0400 | [diff] [blame] | 802 | subdir('net') |
Marc-André Lureau | 17ef2af | 2019-07-22 23:40:45 +0400 | [diff] [blame] | 803 | subdir('replay') |
Marc-André Lureau | 582ea95 | 2019-08-15 15:15:32 +0400 | [diff] [blame] | 804 | subdir('hw') |
Marc-André Lureau | 1a82878 | 2019-08-18 16:13:08 +0400 | [diff] [blame] | 805 | subdir('accel') |
Paolo Bonzini | f556b4a | 2020-01-24 13:08:01 +0100 | [diff] [blame] | 806 | subdir('plugins') |
Marc-André Lureau | b309c32 | 2019-08-18 19:20:37 +0400 | [diff] [blame] | 807 | subdir('bsd-user') |
Marc-André Lureau | 3a30446 | 2019-08-18 16:13:08 +0400 | [diff] [blame] | 808 | subdir('linux-user') |
| 809 | |
Marc-André Lureau | b309c32 | 2019-08-18 19:20:37 +0400 | [diff] [blame] | 810 | bsd_user_ss.add(files('gdbstub.c')) |
| 811 | specific_ss.add_all(when: 'CONFIG_BSD_USER', if_true: bsd_user_ss) |
| 812 | |
Marc-André Lureau | 3a30446 | 2019-08-18 16:13:08 +0400 | [diff] [blame] | 813 | linux_user_ss.add(files('gdbstub.c', 'thunk.c')) |
| 814 | specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss) |
Paolo Bonzini | 5d3ea0e | 2020-08-06 13:40:26 +0200 | [diff] [blame] | 815 | |
Paolo Bonzini | a2ce7db | 2020-08-04 20:00:40 +0200 | [diff] [blame] | 816 | # needed for fuzzing binaries |
| 817 | subdir('tests/qtest/libqos') |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 818 | subdir('tests/qtest/fuzz') |
Paolo Bonzini | a2ce7db | 2020-08-04 20:00:40 +0200 | [diff] [blame] | 819 | |
Marc-André Lureau | 3154fee | 2019-08-29 22:07:01 +0400 | [diff] [blame] | 820 | block_mods = [] |
| 821 | softmmu_mods = [] |
| 822 | foreach d, list : modules |
| 823 | foreach m, module_ss : list |
| 824 | if enable_modules and targetos != 'windows' |
| 825 | module_ss = module_ss.apply(config_host, strict: false) |
| 826 | sl = static_library(d + '-' + m, [genh, module_ss.sources()], |
| 827 | dependencies: [modulecommon, module_ss.dependencies()], pic: true) |
| 828 | if d == 'block' |
| 829 | block_mods += sl |
| 830 | else |
| 831 | softmmu_mods += sl |
| 832 | endif |
| 833 | else |
| 834 | if d == 'block' |
| 835 | block_ss.add_all(module_ss) |
| 836 | else |
| 837 | softmmu_ss.add_all(module_ss) |
| 838 | endif |
| 839 | endif |
| 840 | endforeach |
| 841 | endforeach |
| 842 | |
| 843 | nm = find_program('nm') |
| 844 | undefsym = find_program('scripts/undefsym.sh') |
| 845 | block_syms = custom_target('block.syms', output: 'block.syms', |
| 846 | input: [libqemuutil, block_mods], |
| 847 | capture: true, |
| 848 | command: [undefsym, nm, '@INPUT@']) |
| 849 | qemu_syms = custom_target('qemu.syms', output: 'qemu.syms', |
| 850 | input: [libqemuutil, softmmu_mods], |
| 851 | capture: true, |
| 852 | command: [undefsym, nm, '@INPUT@']) |
| 853 | |
Marc-André Lureau | 5e5733e | 2019-08-29 22:34:43 +0400 | [diff] [blame] | 854 | block_ss = block_ss.apply(config_host, strict: false) |
| 855 | libblock = static_library('block', block_ss.sources() + genh, |
| 856 | dependencies: block_ss.dependencies(), |
| 857 | link_depends: block_syms, |
| 858 | name_suffix: 'fa', |
| 859 | build_by_default: false) |
| 860 | |
| 861 | block = declare_dependency(link_whole: [libblock], |
Marc-André Lureau | b7c70bf | 2019-07-16 21:37:25 +0400 | [diff] [blame] | 862 | link_args: '@block.syms', |
| 863 | dependencies: [crypto, io]) |
Marc-André Lureau | 5e5733e | 2019-08-29 22:34:43 +0400 | [diff] [blame] | 864 | |
Paolo Bonzini | ff219dc | 2020-08-04 21:14:26 +0200 | [diff] [blame] | 865 | qmp_ss = qmp_ss.apply(config_host, strict: false) |
| 866 | libqmp = static_library('qmp', qmp_ss.sources() + genh, |
| 867 | dependencies: qmp_ss.dependencies(), |
| 868 | name_suffix: 'fa', |
| 869 | build_by_default: false) |
| 870 | |
| 871 | qmp = declare_dependency(link_whole: [libqmp]) |
| 872 | |
Marc-André Lureau | 3154fee | 2019-08-29 22:07:01 +0400 | [diff] [blame] | 873 | foreach m : block_mods + softmmu_mods |
| 874 | shared_module(m.name(), |
| 875 | name_prefix: '', |
| 876 | link_whole: m, |
| 877 | install: true, |
| 878 | install_dir: config_host['qemu_moddir']) |
| 879 | endforeach |
| 880 | |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 881 | softmmu_ss.add(authz, block, chardev, crypto, io, qmp) |
| 882 | common_ss.add(qom, qemuutil) |
| 883 | |
| 884 | common_ss.add_all(when: 'CONFIG_SOFTMMU', if_true: [softmmu_ss]) |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 885 | common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss) |
| 886 | |
| 887 | common_all = common_ss.apply(config_all, strict: false) |
| 888 | common_all = static_library('common', |
| 889 | build_by_default: false, |
| 890 | sources: common_all.sources() + genh, |
| 891 | dependencies: common_all.dependencies(), |
| 892 | name_suffix: 'fa') |
| 893 | |
Marc-André Lureau | c9322ab | 2019-08-18 19:51:17 +0400 | [diff] [blame] | 894 | feature_to_c = find_program('scripts/feature_to_c.sh') |
| 895 | |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 896 | emulators = [] |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 897 | foreach target : target_dirs |
| 898 | config_target = config_target_mak[target] |
| 899 | target_name = config_target['TARGET_NAME'] |
| 900 | arch = config_target['TARGET_BASE_ARCH'] |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 901 | arch_srcs = [config_target_h[target]] |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 902 | arch_deps = [] |
| 903 | c_args = ['-DNEED_CPU_H', |
| 904 | '-DCONFIG_TARGET="@0@-config-target.h"'.format(target), |
| 905 | '-DCONFIG_DEVICES="@0@-config-devices.h"'.format(target)] |
| 906 | link_args = [] |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 907 | |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 908 | config_target += config_host |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 909 | target_inc = [include_directories('target' / config_target['TARGET_BASE_ARCH'])] |
| 910 | if targetos == 'linux' |
| 911 | target_inc += include_directories('linux-headers', is_system: true) |
| 912 | endif |
| 913 | if target.endswith('-softmmu') |
| 914 | qemu_target_name = 'qemu-system-' + target_name |
| 915 | target_type='system' |
Paolo Bonzini | abff1ab | 2020-08-07 12:10:23 +0200 | [diff] [blame] | 916 | t = target_softmmu_arch[arch].apply(config_target, strict: false) |
| 917 | arch_srcs += t.sources() |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 918 | arch_deps += t.dependencies() |
Paolo Bonzini | abff1ab | 2020-08-07 12:10:23 +0200 | [diff] [blame] | 919 | |
Marc-André Lureau | 2c44220 | 2019-08-17 13:55:58 +0400 | [diff] [blame] | 920 | hw_dir = target_name == 'sparc64' ? 'sparc64' : arch |
| 921 | hw = hw_arch[hw_dir].apply(config_target, strict: false) |
| 922 | arch_srcs += hw.sources() |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 923 | arch_deps += hw.dependencies() |
Marc-André Lureau | 2c44220 | 2019-08-17 13:55:58 +0400 | [diff] [blame] | 924 | |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 925 | arch_srcs += config_devices_h[target] |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 926 | link_args += ['@block.syms', '@qemu.syms'] |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 927 | else |
Marc-André Lureau | 3a30446 | 2019-08-18 16:13:08 +0400 | [diff] [blame] | 928 | abi = config_target['TARGET_ABI_DIR'] |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 929 | target_type='user' |
| 930 | qemu_target_name = 'qemu-' + target_name |
| 931 | if 'CONFIG_LINUX_USER' in config_target |
| 932 | base_dir = 'linux-user' |
| 933 | target_inc += include_directories('linux-user/host/' / config_host['ARCH']) |
| 934 | else |
| 935 | base_dir = 'bsd-user' |
| 936 | endif |
| 937 | target_inc += include_directories( |
| 938 | base_dir, |
Marc-André Lureau | 3a30446 | 2019-08-18 16:13:08 +0400 | [diff] [blame] | 939 | base_dir / abi, |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 940 | ) |
Marc-André Lureau | 3a30446 | 2019-08-18 16:13:08 +0400 | [diff] [blame] | 941 | if 'CONFIG_LINUX_USER' in config_target |
| 942 | dir = base_dir / abi |
| 943 | arch_srcs += files(dir / 'signal.c', dir / 'cpu_loop.c') |
| 944 | if config_target.has_key('TARGET_SYSTBL_ABI') |
| 945 | arch_srcs += \ |
| 946 | syscall_nr_generators[abi].process(base_dir / abi / config_target['TARGET_SYSTBL'], |
| 947 | extra_args : config_target['TARGET_SYSTBL_ABI']) |
| 948 | endif |
| 949 | endif |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 950 | endif |
| 951 | |
Marc-André Lureau | c9322ab | 2019-08-18 19:51:17 +0400 | [diff] [blame] | 952 | if 'TARGET_XML_FILES' in config_target |
| 953 | gdbstub_xml = custom_target(target + '-gdbstub-xml.c', |
| 954 | output: target + '-gdbstub-xml.c', |
| 955 | input: files(config_target['TARGET_XML_FILES'].split()), |
| 956 | command: [feature_to_c, '@INPUT@'], |
| 957 | capture: true) |
| 958 | arch_srcs += gdbstub_xml |
| 959 | endif |
| 960 | |
Paolo Bonzini | abff1ab | 2020-08-07 12:10:23 +0200 | [diff] [blame] | 961 | t = target_arch[arch].apply(config_target, strict: false) |
| 962 | arch_srcs += t.sources() |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 963 | arch_deps += t.dependencies() |
Paolo Bonzini | abff1ab | 2020-08-07 12:10:23 +0200 | [diff] [blame] | 964 | |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 965 | target_common = common_ss.apply(config_target, strict: false) |
| 966 | objects = common_all.extract_objects(target_common.sources()) |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 967 | deps = target_common.dependencies() |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 968 | |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 969 | target_specific = specific_ss.apply(config_target, strict: false) |
| 970 | arch_srcs += target_specific.sources() |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 971 | arch_deps += target_specific.dependencies() |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 972 | |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 973 | lib = static_library('qemu-' + target, |
Paolo Bonzini | 859aef0 | 2020-08-04 18:14:26 +0200 | [diff] [blame] | 974 | sources: arch_srcs + genh, |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 975 | objects: objects, |
| 976 | include_directories: target_inc, |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 977 | c_args: c_args, |
| 978 | build_by_default: false, |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 979 | name_suffix: 'fa') |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 980 | |
| 981 | if target.endswith('-softmmu') |
| 982 | execs = [{ |
| 983 | 'name': 'qemu-system-' + target_name, |
| 984 | 'gui': false, |
| 985 | 'sources': files('softmmu/main.c'), |
| 986 | 'dependencies': [] |
| 987 | }] |
Paolo Bonzini | 35be72b | 2020-02-06 14:17:15 +0100 | [diff] [blame] | 988 | if targetos == 'windows' and (sdl.found() or gtk.found()) |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 989 | execs += [{ |
| 990 | 'name': 'qemu-system-' + target_name + 'w', |
| 991 | 'gui': true, |
| 992 | 'sources': files('softmmu/main.c'), |
| 993 | 'dependencies': [] |
| 994 | }] |
| 995 | endif |
| 996 | if config_host.has_key('CONFIG_FUZZ') |
| 997 | specific_fuzz = specific_fuzz_ss.apply(config_target, strict: false) |
| 998 | execs += [{ |
| 999 | 'name': 'qemu-fuzz-' + target_name, |
| 1000 | 'gui': false, |
| 1001 | 'sources': specific_fuzz.sources(), |
| 1002 | 'dependencies': specific_fuzz.dependencies(), |
| 1003 | 'link_depends': [files('tests/qtest/fuzz/fork_fuzz.ld')], |
| 1004 | }] |
| 1005 | endif |
| 1006 | else |
| 1007 | execs = [{ |
| 1008 | 'name': 'qemu-' + target_name, |
| 1009 | 'gui': false, |
| 1010 | 'sources': [], |
| 1011 | 'dependencies': [] |
| 1012 | }] |
| 1013 | endif |
| 1014 | foreach exe: execs |
| 1015 | emulators += executable(exe['name'], exe['sources'], |
| 1016 | install: true, |
| 1017 | c_args: c_args, |
| 1018 | dependencies: arch_deps + deps + exe['dependencies'], |
| 1019 | objects: lib.extract_all_objects(recursive: true), |
| 1020 | link_language: link_language, |
| 1021 | link_depends: [block_syms, qemu_syms] + exe.get('link_depends', []), |
| 1022 | link_args: link_args, |
| 1023 | gui_app: exe['gui']) |
Marc-André Lureau | 10e1d26 | 2019-08-20 12:29:52 +0400 | [diff] [blame] | 1024 | |
| 1025 | if 'CONFIG_TRACE_SYSTEMTAP' in config_host |
| 1026 | foreach stp: [ |
| 1027 | {'ext': '.stp-build', 'fmt': 'stap', 'bin': meson.current_build_dir() / exe_name, 'install': false}, |
| 1028 | {'ext': '.stp', 'fmt': 'stap', 'bin': get_option('prefix') / get_option('bindir') / exe_name, 'install': true}, |
| 1029 | {'ext': '-simpletrace.stp', 'fmt': 'simpletrace-stap', 'bin': '', 'install': true}, |
| 1030 | {'ext': '-log.stp', 'fmt': 'log-stap', 'bin': '', 'install': true}, |
| 1031 | ] |
| 1032 | custom_target(exe_name + stp['ext'], |
| 1033 | input: trace_events_all, |
| 1034 | output: exe_name + stp['ext'], |
| 1035 | capture: true, |
| 1036 | install: stp['install'], |
| 1037 | install_dir: config_host['qemu_datadir'] / '../systemtap/tapset', |
| 1038 | command: [ |
| 1039 | tracetool, '--group=all', '--format=' + stp['fmt'], |
| 1040 | '--binary=' + stp['bin'], |
| 1041 | '--target-name=' + target_name, |
| 1042 | '--target-type=' + target_type, |
| 1043 | '--probe-prefix=qemu.' + target_type + '.' + target_name, |
| 1044 | '@INPUT@', |
| 1045 | ]) |
| 1046 | endforeach |
| 1047 | endif |
Paolo Bonzini | 64ed6f9 | 2020-08-03 17:04:25 +0200 | [diff] [blame] | 1048 | endforeach |
Paolo Bonzini | 2becc36 | 2020-02-03 11:42:03 +0100 | [diff] [blame] | 1049 | endforeach |
| 1050 | |
Paolo Bonzini | 931049b | 2020-02-05 09:44:24 +0100 | [diff] [blame] | 1051 | # Other build targets |
Marc-André Lureau | 897b5af | 2019-07-16 21:54:15 +0400 | [diff] [blame] | 1052 | |
Paolo Bonzini | f556b4a | 2020-01-24 13:08:01 +0100 | [diff] [blame] | 1053 | if 'CONFIG_PLUGIN' in config_host |
| 1054 | install_headers('include/qemu/qemu-plugin.h') |
| 1055 | endif |
| 1056 | |
Paolo Bonzini | f15bff2 | 2019-07-18 13:19:02 +0200 | [diff] [blame] | 1057 | if 'CONFIG_GUEST_AGENT' in config_host |
| 1058 | subdir('qga') |
| 1059 | endif |
| 1060 | |
Paolo Bonzini | 931049b | 2020-02-05 09:44:24 +0100 | [diff] [blame] | 1061 | if have_tools |
Marc-André Lureau | b7c70bf | 2019-07-16 21:37:25 +0400 | [diff] [blame] | 1062 | qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep], |
| 1063 | dependencies: [authz, block, crypto, io, qom, qemuutil], install: true) |
| 1064 | qemu_io = executable('qemu-io', files('qemu-io.c'), |
| 1065 | dependencies: [block, qemuutil], install: true) |
Paolo Bonzini | d3ca592 | 2020-01-28 14:49:18 +0100 | [diff] [blame] | 1066 | qemu_block_tools = [qemu_img, qemu_io] |
Marc-André Lureau | b7c70bf | 2019-07-16 21:37:25 +0400 | [diff] [blame] | 1067 | if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd') |
| 1068 | qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'), |
| 1069 | dependencies: [block, qemuutil], install: true) |
Paolo Bonzini | d3ca592 | 2020-01-28 14:49:18 +0100 | [diff] [blame] | 1070 | qemu_block_tools += [qemu_nbd] |
Marc-André Lureau | b7c70bf | 2019-07-16 21:37:25 +0400 | [diff] [blame] | 1071 | endif |
| 1072 | |
Paolo Bonzini | 7c58bb7 | 2020-08-04 20:18:36 +0200 | [diff] [blame] | 1073 | subdir('storage-daemon') |
Paolo Bonzini | a9c9727 | 2019-06-10 12:27:52 +0200 | [diff] [blame] | 1074 | subdir('contrib/rdmacm-mux') |
Marc-André Lureau | 1d7bb6a | 2019-07-12 23:47:06 +0400 | [diff] [blame] | 1075 | subdir('contrib/elf2dmp') |
Paolo Bonzini | a9c9727 | 2019-06-10 12:27:52 +0200 | [diff] [blame] | 1076 | |
Marc-André Lureau | ade60d4 | 2019-07-15 14:48:31 +0400 | [diff] [blame] | 1077 | if 'CONFIG_XKBCOMMON' in config_host |
| 1078 | executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c'), |
| 1079 | dependencies: [qemuutil, xkbcommon], install: true) |
| 1080 | endif |
| 1081 | |
Marc-André Lureau | 157e7b1 | 2019-07-15 14:50:58 +0400 | [diff] [blame] | 1082 | executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'), |
| 1083 | dependencies: qemuutil, |
| 1084 | install: true) |
| 1085 | |
Paolo Bonzini | 931049b | 2020-02-05 09:44:24 +0100 | [diff] [blame] | 1086 | if 'CONFIG_VHOST_USER' in config_host |
| 1087 | subdir('contrib/libvhost-user') |
Paolo Bonzini | 2d7ac0a | 2019-06-10 12:18:02 +0200 | [diff] [blame] | 1088 | subdir('contrib/vhost-user-blk') |
Marc-André Lureau | ea45896 | 2019-07-12 22:23:46 +0400 | [diff] [blame] | 1089 | if 'CONFIG_LINUX' in config_host |
| 1090 | subdir('contrib/vhost-user-gpu') |
| 1091 | endif |
Marc-André Lureau | 32fcc62 | 2019-07-12 22:11:20 +0400 | [diff] [blame] | 1092 | subdir('contrib/vhost-user-input') |
Paolo Bonzini | 99650b6 | 2019-06-10 12:21:14 +0200 | [diff] [blame] | 1093 | subdir('contrib/vhost-user-scsi') |
Paolo Bonzini | 931049b | 2020-02-05 09:44:24 +0100 | [diff] [blame] | 1094 | endif |
Marc-André Lureau | 8f51e01 | 2019-07-15 14:39:25 +0400 | [diff] [blame] | 1095 | |
| 1096 | if targetos == 'linux' |
| 1097 | executable('qemu-bridge-helper', files('qemu-bridge-helper.c'), |
| 1098 | dependencies: [qemuutil, libcap_ng], |
| 1099 | install: true, |
| 1100 | install_dir: get_option('libexecdir')) |
Marc-André Lureau | 897b5af | 2019-07-16 21:54:15 +0400 | [diff] [blame] | 1101 | |
| 1102 | executable('qemu-pr-helper', files('scsi/qemu-pr-helper.c', 'scsi/utils.c'), |
| 1103 | dependencies: [authz, crypto, io, qom, qemuutil, |
| 1104 | libcap_ng, libudev, libmpathpersist], |
| 1105 | install: true) |
Marc-André Lureau | 8f51e01 | 2019-07-15 14:39:25 +0400 | [diff] [blame] | 1106 | endif |
| 1107 | |
Marc-André Lureau | 5ee24e7 | 2019-07-12 23:16:54 +0400 | [diff] [blame] | 1108 | if 'CONFIG_IVSHMEM' in config_host |
| 1109 | subdir('contrib/ivshmem-client') |
| 1110 | subdir('contrib/ivshmem-server') |
| 1111 | endif |
Paolo Bonzini | 931049b | 2020-02-05 09:44:24 +0100 | [diff] [blame] | 1112 | endif |
| 1113 | |
Paolo Bonzini | 3f99cf5 | 2020-02-05 09:45:39 +0100 | [diff] [blame] | 1114 | subdir('tools') |
Marc-André Lureau | bdcbea7 | 2019-07-15 21:22:31 +0400 | [diff] [blame] | 1115 | subdir('pc-bios') |
Paolo Bonzini | ce1c1e7 | 2020-01-28 16:41:44 +0100 | [diff] [blame] | 1116 | subdir('tests') |
Paolo Bonzini | f8aa24e | 2020-08-05 15:49:10 +0200 | [diff] [blame] | 1117 | subdir('docs') |
Marc-André Lureau | e8f3bd7 | 2019-09-19 21:02:09 +0400 | [diff] [blame^] | 1118 | if 'CONFIG_GTK' in config_host |
| 1119 | subdir('po') |
| 1120 | endif |
Paolo Bonzini | 3f99cf5 | 2020-02-05 09:45:39 +0100 | [diff] [blame] | 1121 | |
Paolo Bonzini | acfdaac | 2020-08-05 13:07:48 +0200 | [diff] [blame] | 1122 | if build_docs |
| 1123 | makeinfo = find_program('makeinfo', required: build_docs) |
| 1124 | |
| 1125 | docs_inc = [ |
| 1126 | '-I', meson.current_source_dir(), |
| 1127 | '-I', meson.current_build_dir() / 'docs', |
| 1128 | '-I', '@OUTDIR@', |
| 1129 | ] |
| 1130 | |
| 1131 | version_texi = configure_file(output: 'version.texi', |
| 1132 | input: 'version.texi.in', |
| 1133 | configuration: {'VERSION': meson.project_version(), |
| 1134 | 'qemu_confdir': config_host['qemu_confdir']}) |
| 1135 | |
| 1136 | texi = { |
| 1137 | 'qemu-qmp-ref': ['docs/interop/qemu-qmp-ref.texi', qapi_doc_texi, version_texi], |
| 1138 | } |
| 1139 | if 'CONFIG_GUEST_AGENT' in config_host |
| 1140 | texi += {'qemu-ga-ref': ['docs/interop/qemu-ga-ref.texi', qga_qapi_doc_texi, version_texi]} |
| 1141 | endif |
| 1142 | |
| 1143 | if makeinfo.found() |
| 1144 | cmd = [ |
| 1145 | 'env', 'LC_ALL=C', makeinfo, '--no-split', '--number-sections', docs_inc, |
| 1146 | '@INPUT0@', '-o', '@OUTPUT@', |
| 1147 | ] |
| 1148 | foreach ext, args: { |
| 1149 | 'info': [], |
| 1150 | 'html': ['--no-headers', '--html'], |
| 1151 | 'txt': ['--no-headers', '--plaintext'], |
| 1152 | } |
| 1153 | t = [] |
| 1154 | foreach doc, input: texi |
| 1155 | output = doc + '.' + ext |
| 1156 | t += custom_target(output, |
| 1157 | input: input, |
| 1158 | output: output, |
| 1159 | install: true, |
| 1160 | install_dir: config_host['qemu_docdir'] / 'interop', |
| 1161 | command: cmd + args) |
| 1162 | endforeach |
| 1163 | alias_target(ext, t) |
| 1164 | endforeach |
| 1165 | endif |
| 1166 | |
| 1167 | texi2pdf = find_program('texi2pdf', required: false) |
| 1168 | |
| 1169 | if texi2pdf.found() |
| 1170 | pdfs = [] |
| 1171 | foreach doc, input: texi |
| 1172 | output = doc + '.pdf' |
| 1173 | pdfs += custom_target(output, |
| 1174 | input: input, |
| 1175 | output: output, |
| 1176 | command: [texi2pdf, '-q', docs_inc, '@INPUT0@', '-o', '@OUTPUT@'], |
| 1177 | build_by_default: false) |
| 1178 | endforeach |
| 1179 | alias_target('pdf', pdfs) |
| 1180 | endif |
| 1181 | |
| 1182 | texi2pod = find_program('scripts/texi2pod.pl') |
| 1183 | pod2man = find_program('pod2man', required: build_docs) |
| 1184 | |
| 1185 | if pod2man.found() |
| 1186 | foreach doc, input: texi |
| 1187 | man = doc + '.7' |
| 1188 | pod = custom_target(man + '.pod', |
| 1189 | input: input, |
| 1190 | output: man + '.pod', |
| 1191 | command: [texi2pod, |
| 1192 | '-DVERSION="' + meson.project_version() + '"', |
| 1193 | '-DCONFDIR="' + config_host['qemu_confdir'] + '"', |
| 1194 | '@INPUT0@', '@OUTPUT@']) |
| 1195 | man = custom_target(man, |
| 1196 | input: pod, |
| 1197 | output: man, |
| 1198 | capture: true, |
| 1199 | install: true, |
| 1200 | install_dir: config_host['mandir'] / 'man7', |
| 1201 | command: [pod2man, '--utf8', '--section=7', '--center=" "', |
| 1202 | '--release=" "', '@INPUT@']) |
| 1203 | endforeach |
| 1204 | endif |
| 1205 | endif |
| 1206 | |
Paolo Bonzini | f933275 | 2020-02-03 13:28:38 +0100 | [diff] [blame] | 1207 | summary_info = {} |
| 1208 | summary_info += {'Install prefix': config_host['prefix']} |
| 1209 | summary_info += {'BIOS directory': config_host['qemu_datadir']} |
| 1210 | summary_info += {'firmware path': config_host['qemu_firmwarepath']} |
| 1211 | summary_info += {'binary directory': config_host['bindir']} |
| 1212 | summary_info += {'library directory': config_host['libdir']} |
| 1213 | summary_info += {'module directory': config_host['qemu_moddir']} |
| 1214 | summary_info += {'libexec directory': config_host['libexecdir']} |
| 1215 | summary_info += {'include directory': config_host['includedir']} |
| 1216 | summary_info += {'config directory': config_host['sysconfdir']} |
| 1217 | if targetos != 'windows' |
| 1218 | summary_info += {'local state directory': config_host['qemu_localstatedir']} |
| 1219 | summary_info += {'Manual directory': config_host['mandir']} |
| 1220 | else |
| 1221 | summary_info += {'local state directory': 'queried at runtime'} |
| 1222 | endif |
| 1223 | summary_info += {'Build directory': meson.current_build_dir()} |
| 1224 | summary_info += {'Source path': meson.current_source_dir()} |
| 1225 | summary_info += {'GIT binary': config_host['GIT']} |
| 1226 | summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']} |
| 1227 | summary_info += {'C compiler': meson.get_compiler('c').cmd_array()[0]} |
| 1228 | summary_info += {'Host C compiler': meson.get_compiler('c', native: true).cmd_array()[0]} |
| 1229 | if link_language == 'cpp' |
| 1230 | summary_info += {'C++ compiler': meson.get_compiler('cpp').cmd_array()[0]} |
| 1231 | else |
| 1232 | summary_info += {'C++ compiler': false} |
| 1233 | endif |
| 1234 | if targetos == 'darwin' |
| 1235 | summary_info += {'Objective-C compiler': meson.get_compiler('objc').cmd_array()[0]} |
| 1236 | endif |
| 1237 | summary_info += {'ARFLAGS': config_host['ARFLAGS']} |
| 1238 | summary_info += {'CFLAGS': config_host['CFLAGS']} |
| 1239 | summary_info += {'QEMU_CFLAGS': config_host['QEMU_CFLAGS']} |
| 1240 | summary_info += {'QEMU_LDFLAGS': config_host['QEMU_LDFLAGS']} |
| 1241 | summary_info += {'make': config_host['MAKE']} |
| 1242 | summary_info += {'install': config_host['INSTALL']} |
| 1243 | summary_info += {'python': '@0@ (version: @1@)'.format(python.full_path(), python.language_version())} |
| 1244 | summary_info += {'sphinx-build': config_host['SPHINX_BUILD']} |
| 1245 | summary_info += {'genisoimage': config_host['GENISOIMAGE']} |
| 1246 | # TODO: add back version |
| 1247 | summary_info += {'slirp support': config_host.has_key('CONFIG_SLIRP')} |
| 1248 | if config_host.has_key('CONFIG_SLIRP') |
| 1249 | summary_info += {'smbd': config_host['CONFIG_SMBD_COMMAND']} |
| 1250 | endif |
| 1251 | summary_info += {'module support': config_host.has_key('CONFIG_MODULES')} |
| 1252 | if config_host.has_key('CONFIG_MODULES') |
| 1253 | summary_info += {'alternative module path': config_host.has_key('CONFIG_MODULE_UPGRADES')} |
| 1254 | endif |
| 1255 | summary_info += {'host CPU': cpu} |
| 1256 | summary_info += {'host endianness': build_machine.endian()} |
| 1257 | summary_info += {'target list': config_host['TARGET_DIRS']} |
| 1258 | summary_info += {'gprof enabled': config_host.has_key('CONFIG_GPROF')} |
| 1259 | summary_info += {'sparse enabled': meson.get_compiler('c').cmd_array().contains('cgcc')} |
| 1260 | summary_info += {'strip binaries': get_option('strip')} |
| 1261 | summary_info += {'profiler': config_host.has_key('CONFIG_PROFILER')} |
| 1262 | summary_info += {'static build': config_host.has_key('CONFIG_TOOLS')} |
| 1263 | if targetos == 'darwin' |
| 1264 | summary_info += {'Cocoa support': config_host.has_key('CONFIG_COCOA')} |
| 1265 | endif |
| 1266 | # TODO: add back version |
Paolo Bonzini | 35be72b | 2020-02-06 14:17:15 +0100 | [diff] [blame] | 1267 | summary_info += {'SDL support': sdl.found()} |
| 1268 | summary_info += {'SDL image support': sdl_image.found()} |
Paolo Bonzini | f933275 | 2020-02-03 13:28:38 +0100 | [diff] [blame] | 1269 | # TODO: add back version |
| 1270 | summary_info += {'GTK support': config_host.has_key('CONFIG_GTK')} |
| 1271 | summary_info += {'GTK GL support': config_host.has_key('CONFIG_GTK_GL')} |
| 1272 | # TODO: add back version |
| 1273 | summary_info += {'VTE support': config_host.has_key('CONFIG_VTE')} |
| 1274 | summary_info += {'TLS priority': config_host['CONFIG_TLS_PRIORITY']} |
| 1275 | summary_info += {'GNUTLS support': config_host.has_key('CONFIG_GNUTLS')} |
| 1276 | # TODO: add back version |
| 1277 | summary_info += {'libgcrypt': config_host.has_key('CONFIG_GCRYPT')} |
| 1278 | if config_host.has_key('CONFIG_GCRYPT') |
| 1279 | summary_info += {' hmac': config_host.has_key('CONFIG_GCRYPT_HMAC')} |
| 1280 | summary_info += {' XTS': not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')} |
| 1281 | endif |
| 1282 | # TODO: add back version |
| 1283 | summary_info += {'nettle': config_host.has_key('CONFIG_NETTLE')} |
| 1284 | if config_host.has_key('CONFIG_NETTLE') |
| 1285 | summary_info += {' XTS': not config_host.has_key('CONFIG_QEMU_PRIVATE_XTS')} |
| 1286 | endif |
| 1287 | summary_info += {'libtasn1': config_host.has_key('CONFIG_TASN1')} |
| 1288 | summary_info += {'PAM': config_host.has_key('CONFIG_AUTH_PAM')} |
| 1289 | summary_info += {'iconv support': config_host.has_key('CONFIG_ICONV')} |
| 1290 | summary_info += {'curses support': config_host.has_key('CONFIG_CURSES')} |
| 1291 | # TODO: add back version |
| 1292 | summary_info += {'virgl support': config_host.has_key('CONFIG_VIRGL')} |
| 1293 | summary_info += {'curl support': config_host.has_key('CONFIG_CURL')} |
| 1294 | summary_info += {'mingw32 support': targetos == 'windows'} |
| 1295 | summary_info += {'Audio drivers': config_host['CONFIG_AUDIO_DRIVERS']} |
| 1296 | summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']} |
| 1297 | summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']} |
| 1298 | summary_info += {'VirtFS support': config_host.has_key('CONFIG_VIRTFS')} |
| 1299 | summary_info += {'Multipath support': config_host.has_key('CONFIG_MPATH')} |
Paolo Bonzini | a0b9323 | 2020-02-06 15:48:52 +0100 | [diff] [blame] | 1300 | summary_info += {'VNC support': vnc.found()} |
| 1301 | if vnc.found() |
| 1302 | summary_info += {'VNC SASL support': sasl.found()} |
| 1303 | summary_info += {'VNC JPEG support': jpeg.found()} |
| 1304 | summary_info += {'VNC PNG support': png.found()} |
Paolo Bonzini | f933275 | 2020-02-03 13:28:38 +0100 | [diff] [blame] | 1305 | endif |
| 1306 | summary_info += {'xen support': config_host.has_key('CONFIG_XEN_BACKEND')} |
| 1307 | if config_host.has_key('CONFIG_XEN_BACKEND') |
| 1308 | summary_info += {'xen ctrl version': config_host['CONFIG_XEN_CTRL_INTERFACE_VERSION']} |
| 1309 | endif |
| 1310 | summary_info += {'brlapi support': config_host.has_key('CONFIG_BRLAPI')} |
| 1311 | summary_info += {'Documentation': config_host.has_key('BUILD_DOCS')} |
| 1312 | summary_info += {'PIE': get_option('b_pie')} |
| 1313 | summary_info += {'vde support': config_host.has_key('CONFIG_VDE')} |
| 1314 | summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')} |
| 1315 | summary_info += {'Linux AIO support': config_host.has_key('CONFIG_LINUX_AIO')} |
| 1316 | summary_info += {'Linux io_uring support': config_host.has_key('CONFIG_LINUX_IO_URING')} |
| 1317 | summary_info += {'ATTR/XATTR support': config_host.has_key('CONFIG_ATTR')} |
| 1318 | summary_info += {'Install blobs': config_host.has_key('INSTALL_BLOBS')} |
| 1319 | # TODO: add back KVM/HAX/HVF/WHPX/TCG |
| 1320 | #summary_info += {'KVM support': have_kvm'} |
| 1321 | #summary_info += {'HAX support': have_hax'} |
| 1322 | #summary_info += {'HVF support': have_hvf'} |
| 1323 | #summary_info += {'WHPX support': have_whpx'} |
| 1324 | #summary_info += {'TCG support': have_tcg'} |
| 1325 | #if get_option('tcg') |
| 1326 | # summary_info += {'TCG debug enabled': config_host.has_key('CONFIG_DEBUG_TCG')} |
| 1327 | # summary_info += {'TCG interpreter': config_host.has_key('CONFIG_TCG_INTERPRETER')} |
| 1328 | #endif |
| 1329 | summary_info += {'malloc trim support': config_host.has_key('CONFIG_MALLOC_TRIM')} |
| 1330 | summary_info += {'RDMA support': config_host.has_key('CONFIG_RDMA')} |
| 1331 | summary_info += {'PVRDMA support': config_host.has_key('CONFIG_PVRDMA')} |
| 1332 | summary_info += {'fdt support': config_host.has_key('CONFIG_FDT')} |
| 1333 | summary_info += {'membarrier': config_host.has_key('CONFIG_MEMBARRIER')} |
| 1334 | summary_info += {'preadv support': config_host.has_key('CONFIG_PREADV')} |
| 1335 | summary_info += {'fdatasync': config_host.has_key('CONFIG_FDATASYNC')} |
| 1336 | summary_info += {'madvise': config_host.has_key('CONFIG_MADVISE')} |
| 1337 | summary_info += {'posix_madvise': config_host.has_key('CONFIG_POSIX_MADVISE')} |
| 1338 | summary_info += {'posix_memalign': config_host.has_key('CONFIG_POSIX_MEMALIGN')} |
| 1339 | summary_info += {'libcap-ng support': config_host.has_key('CONFIG_LIBCAP_NG')} |
| 1340 | summary_info += {'vhost-net support': config_host.has_key('CONFIG_VHOST_NET')} |
| 1341 | summary_info += {'vhost-crypto support': config_host.has_key('CONFIG_VHOST_CRYPTO')} |
| 1342 | summary_info += {'vhost-scsi support': config_host.has_key('CONFIG_VHOST_SCSI')} |
| 1343 | summary_info += {'vhost-vsock support': config_host.has_key('CONFIG_VHOST_VSOCK')} |
| 1344 | summary_info += {'vhost-user support': config_host.has_key('CONFIG_VHOST_KERNEL')} |
| 1345 | summary_info += {'vhost-user-fs support': config_host.has_key('CONFIG_VHOST_USER_FS')} |
| 1346 | summary_info += {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST_VDPA')} |
| 1347 | summary_info += {'Trace backends': config_host['TRACE_BACKENDS']} |
| 1348 | if config_host['TRACE_BACKENDS'].split().contains('simple') |
| 1349 | summary_info += {'Trace output file': config_host['CONFIG_TRACE_FILE'] + '-<pid>'} |
| 1350 | endif |
| 1351 | # TODO: add back protocol and server version |
| 1352 | summary_info += {'spice support': config_host.has_key('CONFIG_SPICE')} |
| 1353 | summary_info += {'rbd support': config_host.has_key('CONFIG_RBD')} |
| 1354 | summary_info += {'xfsctl support': config_host.has_key('CONFIG_XFS')} |
| 1355 | summary_info += {'smartcard support': config_host.has_key('CONFIG_SMARTCARD')} |
| 1356 | summary_info += {'libusb': config_host.has_key('CONFIG_USB_LIBUSB')} |
| 1357 | summary_info += {'usb net redir': config_host.has_key('CONFIG_USB_REDIR')} |
| 1358 | summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')} |
| 1359 | summary_info += {'OpenGL dmabufs': config_host.has_key('CONFIG_OPENGL_DMABUF')} |
| 1360 | summary_info += {'libiscsi support': config_host.has_key('CONFIG_LIBISCSI')} |
| 1361 | summary_info += {'libnfs support': config_host.has_key('CONFIG_LIBNFS')} |
| 1362 | summary_info += {'build guest agent': config_host.has_key('CONFIG_GUEST_AGENT')} |
| 1363 | if targetos == 'windows' |
| 1364 | if 'WIN_SDK' in config_host |
| 1365 | summary_info += {'Windows SDK': config_host['WIN_SDK']} |
| 1366 | endif |
| 1367 | summary_info += {'QGA VSS support': config_host.has_key('CONFIG_QGA_VSS')} |
| 1368 | summary_info += {'QGA w32 disk info': config_host.has_key('CONFIG_QGA_NTDDSCSI')} |
| 1369 | summary_info += {'QGA MSI support': config_host.has_key('CONFIG_QGA_MSI_ENABLED')} |
| 1370 | endif |
| 1371 | summary_info += {'seccomp support': config_host.has_key('CONFIG_SECCOMP')} |
| 1372 | summary_info += {'coroutine backend': config_host['CONFIG_COROUTINE_BACKEND']} |
| 1373 | summary_info += {'coroutine pool': config_host['CONFIG_COROUTINE_POOL'] == '1'} |
| 1374 | summary_info += {'debug stack usage': config_host.has_key('CONFIG_DEBUG_STACK_USAGE')} |
| 1375 | summary_info += {'mutex debugging': config_host.has_key('CONFIG_DEBUG_MUTEX')} |
| 1376 | summary_info += {'crypto afalg': config_host.has_key('CONFIG_AF_ALG')} |
| 1377 | summary_info += {'GlusterFS support': config_host.has_key('CONFIG_GLUSTERFS')} |
Marc-André Lureau | bf0e56a | 2019-10-04 17:35:16 +0400 | [diff] [blame] | 1378 | summary_info += {'gcov': get_option('b_coverage')} |
Paolo Bonzini | f933275 | 2020-02-03 13:28:38 +0100 | [diff] [blame] | 1379 | summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')} |
| 1380 | summary_info += {'libssh support': config_host.has_key('CONFIG_LIBSSH')} |
| 1381 | summary_info += {'QOM debugging': config_host.has_key('CONFIG_QOM_CAST_DEBUG')} |
| 1382 | summary_info += {'Live block migration': config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')} |
| 1383 | summary_info += {'lzo support': config_host.has_key('CONFIG_LZO')} |
| 1384 | summary_info += {'snappy support': config_host.has_key('CONFIG_SNAPPY')} |
| 1385 | summary_info += {'bzip2 support': config_host.has_key('CONFIG_BZIP2')} |
| 1386 | summary_info += {'lzfse support': config_host.has_key('CONFIG_LZFSE')} |
| 1387 | summary_info += {'zstd support': config_host.has_key('CONFIG_ZSTD')} |
| 1388 | summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')} |
| 1389 | summary_info += {'libxml2': config_host.has_key('CONFIG_LIBXML2')} |
| 1390 | summary_info += {'tcmalloc support': config_host.has_key('CONFIG_TCMALLOC')} |
| 1391 | summary_info += {'jemalloc support': config_host.has_key('CONFIG_JEMALLOC')} |
| 1392 | summary_info += {'avx2 optimization': config_host.has_key('CONFIG_AVX2_OPT')} |
| 1393 | summary_info += {'avx512f optimization': config_host.has_key('CONFIG_AVX512F_OPT')} |
| 1394 | summary_info += {'replication support': config_host.has_key('CONFIG_REPLICATION')} |
| 1395 | summary_info += {'bochs support': config_host.has_key('CONFIG_BOCHS')} |
| 1396 | summary_info += {'cloop support': config_host.has_key('CONFIG_CLOOP')} |
| 1397 | summary_info += {'dmg support': config_host.has_key('CONFIG_DMG')} |
| 1398 | summary_info += {'qcow v1 support': config_host.has_key('CONFIG_QCOW1')} |
| 1399 | summary_info += {'vdi support': config_host.has_key('CONFIG_VDI')} |
| 1400 | summary_info += {'vvfat support': config_host.has_key('CONFIG_VVFAT')} |
| 1401 | summary_info += {'qed support': config_host.has_key('CONFIG_QED')} |
| 1402 | summary_info += {'parallels support': config_host.has_key('CONFIG_PARALLELS')} |
| 1403 | summary_info += {'sheepdog support': config_host.has_key('CONFIG_SHEEPDOG')} |
| 1404 | summary_info += {'capstone': config_host.has_key('CONFIG_CAPSTONE')} |
| 1405 | summary_info += {'libpmem support': config_host.has_key('CONFIG_LIBPMEM')} |
| 1406 | summary_info += {'libdaxctl support': config_host.has_key('CONFIG_LIBDAXCTL')} |
| 1407 | summary_info += {'libudev': config_host.has_key('CONFIG_LIBUDEV')} |
| 1408 | summary_info += {'default devices': config_host['CONFIG_MINIKCONF_MODE'] == '--defconfig'} |
| 1409 | summary_info += {'plugin support': config_host.has_key('CONFIG_PLUGIN')} |
| 1410 | summary_info += {'fuzzing support': config_host.has_key('CONFIG_FUZZ')} |
| 1411 | if config_host.has_key('HAVE_GDB_BIN') |
| 1412 | summary_info += {'gdb': config_host['HAVE_GDB_BIN']} |
| 1413 | endif |
| 1414 | summary_info += {'thread sanitizer': config_host.has_key('CONFIG_TSAN')} |
| 1415 | summary_info += {'rng-none': config_host.has_key('CONFIG_RNG_NONE')} |
| 1416 | summary_info += {'Linux keyring': config_host.has_key('CONFIG_SECRET_KEYRING')} |
| 1417 | summary(summary_info, bool_yn: true) |
| 1418 | |
| 1419 | if not supported_cpus.contains(cpu) |
| 1420 | message() |
| 1421 | warning('SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!') |
| 1422 | message() |
| 1423 | message('CPU host architecture ' + cpu + ' support is not currently maintained.') |
| 1424 | message('The QEMU project intends to remove support for this host CPU in') |
| 1425 | message('a future release if nobody volunteers to maintain it and to') |
| 1426 | message('provide a build host for our continuous integration setup.') |
| 1427 | message('configure has succeeded and you can continue to build, but') |
| 1428 | message('if you care about QEMU on this platform you should contact') |
| 1429 | message('us upstream at qemu-devel@nongnu.org.') |
| 1430 | endif |
| 1431 | |
| 1432 | if not supported_oses.contains(targetos) |
| 1433 | message() |
| 1434 | warning('WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASES!') |
| 1435 | message() |
| 1436 | message('Host OS ' + targetos + 'support is not currently maintained.') |
| 1437 | message('The QEMU project intends to remove support for this host OS in') |
| 1438 | message('a future release if nobody volunteers to maintain it and to') |
| 1439 | message('provide a build host for our continuous integration setup.') |
| 1440 | message('configure has succeeded and you can continue to build, but') |
| 1441 | message('if you care about QEMU on this platform you should contact') |
| 1442 | message('us upstream at qemu-devel@nongnu.org.') |
| 1443 | endif |