43 ), zstd, zlib, gnutls)
45 softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
47 block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
48 block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
49 block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
50 block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))
51 block_ss.add(when: 'CONFIG_VVFAT', if_true: files('vvfat.c'))
52 block_ss.add(when: 'CONFIG_DMG', if_true: files('dmg.c'))
53 block_ss.add(when: 'CONFIG_QED', if_true: files(
60 block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'],
61 if_true: files('parallels.c', 'parallels-ext.c'))
62 block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
63 block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
64 block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
65 block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
66 block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c'))
67 block_ss.add(when: 'CONFIG_SHEEPDOG', if_true: files('sheepdog.c'))
68 block_ss.add(when: ['CONFIG_LINUX_AIO', libaio], if_true: files('linux-aio.c'))
69 block_ss.add(when: ['CONFIG_LINUX_IO_URING', linux_io_uring], if_true: files('io_uring.c'))
75 [curl, 'curl', [curl, glib], 'curl.c'],
76 [glusterfs, 'gluster', glusterfs, 'gluster.c'],
77 [libiscsi, 'iscsi', libiscsi, 'iscsi.c'],
78 [libnfs, 'nfs', libnfs, 'nfs.c'],
79 [libssh, 'ssh', libssh, 'ssh.c'],
80 [rbd, 'rbd', rbd, 'rbd.c'],
86 module_ss = ss.source_set()
87 module_ss.add(when: m[2], if_true: files(m[3]))
88 block_modules += {m[1] : module_ss}
92 # those are not exactly regular block modules, so treat them apart
93 if 'CONFIG_DMG' in config_host
95 [liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
96 [libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
99 module_ss = ss.source_set()
100 module_ss.add(when: m[2], if_true: files(m[3]))
101 block_modules += {m[1] : module_ss}
106 module_block_py = find_program('../scripts/modules/module_block.py')
107 module_block_h = custom_target('module_block.h',
108 output: 'module_block.h',
110 command: [module_block_py, '@OUTPUT0@', modsrc])
111 block_ss.add(module_block_h)
113 wrapper_py = find_program('../scripts/block-coroutine-wrapper.py')
114 block_gen_c = custom_target('block-gen.c',
115 output: 'block-gen.c',
116 input: files('../include/block/block.h',
118 command: [wrapper_py, '@OUTPUT@', '@INPUT@'])
119 block_ss.add(block_gen_c)
121 block_ss.add(files('stream.c'))
123 softmmu_ss.add(files('qapi-sysemu.c'))
128 modules += {'block': block_modules}