2019-08-30 02:34:43 +08:00
|
|
|
block_ss.add(genh)
|
|
|
|
block_ss.add(files(
|
|
|
|
'accounting.c',
|
|
|
|
'aio_task.c',
|
|
|
|
'amend.c',
|
|
|
|
'backup.c',
|
|
|
|
'backup-top.c',
|
|
|
|
'blkdebug.c',
|
|
|
|
'blklogwrites.c',
|
|
|
|
'blkverify.c',
|
|
|
|
'block-backend.c',
|
|
|
|
'block-copy.c',
|
|
|
|
'commit.c',
|
|
|
|
'copy-on-read.c',
|
2020-10-21 22:58:46 +08:00
|
|
|
'preallocate.c',
|
2021-06-14 16:11:29 +08:00
|
|
|
'progress_meter.c',
|
2019-08-30 02:34:43 +08:00
|
|
|
'create.c',
|
|
|
|
'crypto.c',
|
|
|
|
'dirty-bitmap.c',
|
|
|
|
'filter-compress.c',
|
|
|
|
'io.c',
|
|
|
|
'mirror.c',
|
|
|
|
'nbd.c',
|
|
|
|
'null.c',
|
|
|
|
'qapi.c',
|
|
|
|
'qcow2-bitmap.c',
|
|
|
|
'qcow2-cache.c',
|
|
|
|
'qcow2-cluster.c',
|
|
|
|
'qcow2-refcount.c',
|
|
|
|
'qcow2-snapshot.c',
|
|
|
|
'qcow2-threads.c',
|
|
|
|
'qcow2.c',
|
|
|
|
'quorum.c',
|
|
|
|
'raw-format.c',
|
|
|
|
'snapshot.c',
|
|
|
|
'throttle-groups.c',
|
|
|
|
'throttle.c',
|
|
|
|
'vhdx-endian.c',
|
|
|
|
'vhdx-log.c',
|
|
|
|
'vhdx.c',
|
|
|
|
'vmdk.c',
|
|
|
|
'vpc.c',
|
|
|
|
'write-threshold.c',
|
2021-01-02 20:52:13 +08:00
|
|
|
), zstd, zlib, gnutls)
|
2019-08-30 02:34:43 +08:00
|
|
|
|
replay: do not build if TCG is not available
this fixes non-TCG builds broken recently by replay reverse debugging.
Stub the needed functions in stub/, splitting roughly between functions
needed only by system emulation, by system emulation and tools,
and by everyone. This includes duplicating some code in replay/, and
puts the logic for non-replay related events in the replay/ module (+
the stubs), so this should be revisited in the future.
Surprisingly, only _one_ qtest was affected by this, ide-test.c, which
resulted in a buzz as the bh events were never delivered, and the bh
never executed.
Many other subsystems _should_ have been affected.
This fixes the immediate issue, however a better way to group replay
functionality to TCG-only code could be developed in the long term.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Message-Id: <20201013192123.22632-4-cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-10-14 03:21:23 +08:00
|
|
|
softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
|
|
|
|
|
2020-08-29 01:32:40 +08:00
|
|
|
block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
|
2019-08-30 02:34:43 +08:00
|
|
|
block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
|
|
|
|
block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
|
|
|
|
block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))
|
|
|
|
block_ss.add(when: 'CONFIG_VVFAT', if_true: files('vvfat.c'))
|
|
|
|
block_ss.add(when: 'CONFIG_DMG', if_true: files('dmg.c'))
|
|
|
|
block_ss.add(when: 'CONFIG_QED', if_true: files(
|
|
|
|
'qed-check.c',
|
|
|
|
'qed-cluster.c',
|
|
|
|
'qed-l2-cache.c',
|
|
|
|
'qed-table.c',
|
|
|
|
'qed.c',
|
|
|
|
))
|
2021-02-24 18:47:05 +08:00
|
|
|
block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'],
|
|
|
|
if_true: files('parallels.c', 'parallels-ext.c'))
|
2019-08-30 02:34:43 +08:00
|
|
|
block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
|
|
|
|
block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
|
2020-11-17 20:11:25 +08:00
|
|
|
block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
|
2019-08-30 02:34:43 +08:00
|
|
|
block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
|
|
|
|
block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c'))
|
|
|
|
block_ss.add(when: ['CONFIG_LINUX_AIO', libaio], if_true: files('linux-aio.c'))
|
meson: fix missing preprocessor symbols
While most libraries do not need a CONFIG_* symbol because the
"when:" clauses are enough, some do. Add them back or stop
using them if possible.
In the case of libpmem, the statement to add the CONFIG_* symbol
was still in configure, but could not be triggered because it
checked for "no" instead of "disabled" (and it would be wrong anyway
since the test for the library has not been done yet).
Reported-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Fixes: 587d59d6cc ("configure, meson: convert virgl detection to meson", 2021-07-06)
Fixes: 83ef16821a ("configure, meson: convert libdaxctl detection to meson", 2021-07-06)
Fixes: e36e8c70f6 ("configure, meson: convert libpmem detection to meson", 2021-07-06)
Fixes: 53c22b68e3 ("configure, meson: convert liburing detection to meson", 2021-07-06)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-07-08 19:50:06 +08:00
|
|
|
block_ss.add(when: linux_io_uring, if_true: files('io_uring.c'))
|
2019-08-30 02:34:43 +08:00
|
|
|
|
|
|
|
block_modules = {}
|
|
|
|
|
|
|
|
modsrc = []
|
|
|
|
foreach m : [
|
2021-06-01 15:54:10 +08:00
|
|
|
[curl, 'curl', files('curl.c')],
|
|
|
|
[glusterfs, 'gluster', files('gluster.c')],
|
2021-06-01 16:00:48 +08:00
|
|
|
[libiscsi, 'iscsi', [files('iscsi.c'), libm]],
|
2021-06-01 15:54:10 +08:00
|
|
|
[libnfs, 'nfs', files('nfs.c')],
|
|
|
|
[libssh, 'ssh', files('ssh.c')],
|
|
|
|
[rbd, 'rbd', files('rbd.c')],
|
2019-08-30 02:34:43 +08:00
|
|
|
]
|
2020-11-17 19:59:57 +08:00
|
|
|
if m[0].found()
|
2021-06-01 15:54:10 +08:00
|
|
|
module_ss = ss.source_set()
|
|
|
|
module_ss.add(when: m[0], if_true: m[2])
|
2019-08-30 02:34:43 +08:00
|
|
|
if enable_modules
|
2021-06-01 15:54:10 +08:00
|
|
|
modsrc += module_ss.all_sources()
|
2019-08-30 02:34:43 +08:00
|
|
|
endif
|
|
|
|
block_modules += {m[1] : module_ss}
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
# those are not exactly regular block modules, so treat them apart
|
|
|
|
if 'CONFIG_DMG' in config_host
|
|
|
|
foreach m : [
|
2020-11-17 19:59:57 +08:00
|
|
|
[liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
|
|
|
|
[libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
|
2019-08-30 02:34:43 +08:00
|
|
|
]
|
2020-11-17 19:59:57 +08:00
|
|
|
if m[0].found()
|
2019-08-30 02:34:43 +08:00
|
|
|
module_ss = ss.source_set()
|
|
|
|
module_ss.add(when: m[2], if_true: files(m[3]))
|
|
|
|
block_modules += {m[1] : module_ss}
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
endif
|
|
|
|
|
|
|
|
module_block_py = find_program('../scripts/modules/module_block.py')
|
|
|
|
module_block_h = custom_target('module_block.h',
|
|
|
|
output: 'module_block.h',
|
|
|
|
input: modsrc,
|
|
|
|
command: [module_block_py, '@OUTPUT0@', modsrc])
|
|
|
|
block_ss.add(module_block_h)
|
|
|
|
|
2020-09-25 02:54:11 +08:00
|
|
|
wrapper_py = find_program('../scripts/block-coroutine-wrapper.py')
|
|
|
|
block_gen_c = custom_target('block-gen.c',
|
|
|
|
output: 'block-gen.c',
|
|
|
|
input: files('../include/block/block.h',
|
|
|
|
'coroutines.h'),
|
|
|
|
command: [wrapper_py, '@OUTPUT@', '@INPUT@'])
|
|
|
|
block_ss.add(block_gen_c)
|
|
|
|
|
2019-08-30 02:34:43 +08:00
|
|
|
block_ss.add(files('stream.c'))
|
|
|
|
|
|
|
|
softmmu_ss.add(files('qapi-sysemu.c'))
|
2020-09-24 23:26:50 +08:00
|
|
|
|
|
|
|
subdir('export')
|
2019-08-30 02:34:43 +08:00
|
|
|
subdir('monitor')
|
|
|
|
|
|
|
|
modules += {'block': block_modules}
|