44 ), zstd, zlib, gnutls)
46 softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
48 if get_option('qcow1').allowed()
49 block_ss.add(files('qcow.c'))
51 if get_option('vdi').allowed()
52 block_ss.add(files('vdi.c'))
54 if get_option('cloop').allowed()
55 block_ss.add(files('cloop.c'))
57 if get_option('bochs').allowed()
58 block_ss.add(files('bochs.c'))
60 if get_option('vvfat').allowed()
61 block_ss.add(files('vvfat.c'))
63 if get_option('dmg').allowed()
64 block_ss.add(files('dmg.c'))
66 if get_option('qed').allowed()
75 if get_option('parallels').allowed()
76 block_ss.add(files('parallels.c', 'parallels-ext.c'))
79 block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
80 block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
81 block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
82 block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
83 if not get_option('replication').disabled()
84 block_ss.add(files('replication.c'))
86 block_ss.add(when: libaio, if_true: files('linux-aio.c'))
87 block_ss.add(when: linux_io_uring, if_true: files('io_uring.c'))
93 [curl, 'curl', files('curl.c')],
94 [glusterfs, 'gluster', files('gluster.c')],
95 [libiscsi, 'iscsi', [files('iscsi.c'), libm]],
96 [libnfs, 'nfs', files('nfs.c')],
97 [libssh, 'ssh', files('ssh.c')],
98 [rbd, 'rbd', files('rbd.c')],
101 module_ss = ss.source_set()
102 module_ss.add(when: m[0], if_true: m[2])
104 modsrc += module_ss.all_sources()
106 block_modules += {m[1] : module_ss}
110 # those are not exactly regular block modules, so treat them apart
111 if get_option('dmg').allowed()
113 [liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
114 [libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
117 module_ss = ss.source_set()
118 module_ss.add(when: m[2], if_true: files(m[3]))
119 block_modules += {m[1] : module_ss}
124 module_block_py = find_program('../scripts/modules/module_block.py')
125 module_block_h = custom_target('module_block.h',
126 output: 'module_block.h',
128 command: [module_block_py, '@OUTPUT0@', modsrc])
129 block_ss.add(module_block_h)
131 wrapper_py = find_program('../scripts/block-coroutine-wrapper.py')
132 block_gen_c = custom_target('block-gen.c',
133 output: 'block-gen.c',
134 input: files('../include/block/block.h',
136 command: [wrapper_py, '@OUTPUT@', '@INPUT@'])
137 block_ss.add(block_gen_c)
139 block_ss.add(files('stream.c'))
141 softmmu_ss.add(files('qapi-sysemu.c'))
146 modules += {'block': block_modules}