46 ), zstd, zlib, gnutls)
48 softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
50 if get_option('qcow1').allowed()
51 block_ss.add(files('qcow.c'))
53 if get_option('vdi').allowed()
54 block_ss.add(files('vdi.c'))
56 if get_option('cloop').allowed()
57 block_ss.add(files('cloop.c'))
59 if get_option('bochs').allowed()
60 block_ss.add(files('bochs.c'))
62 if get_option('vvfat').allowed()
63 block_ss.add(files('vvfat.c'))
65 if get_option('dmg').allowed()
66 block_ss.add(files('dmg.c'))
68 if get_option('qed').allowed()
77 if get_option('parallels').allowed()
78 block_ss.add(files('parallels.c', 'parallels-ext.c'))
81 block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
82 block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
83 block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
84 block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
85 if not get_option('replication').disabled()
86 block_ss.add(files('replication.c'))
88 block_ss.add(when: libaio, if_true: files('linux-aio.c'))
89 block_ss.add(when: linux_io_uring, if_true: files('io_uring.c'))
95 [curl, 'curl', files('curl.c')],
96 [glusterfs, 'gluster', files('gluster.c')],
97 [libiscsi, 'iscsi', [files('iscsi.c'), libm]],
98 [libnfs, 'nfs', files('nfs.c')],
99 [libssh, 'ssh', files('ssh.c')],
100 [rbd, 'rbd', files('rbd.c')],
103 module_ss = ss.source_set()
104 module_ss.add(when: m[0], if_true: m[2])
106 modsrc += module_ss.all_sources()
108 block_modules += {m[1] : module_ss}
112 # those are not exactly regular block modules, so treat them apart
113 if get_option('dmg').allowed()
115 [liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
116 [libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
119 module_ss = ss.source_set()
120 module_ss.add(when: m[2], if_true: files(m[3]))
121 block_modules += {m[1] : module_ss}
126 module_block_py = find_program('../scripts/modules/module_block.py')
127 module_block_h = custom_target('module_block.h',
128 output: 'module_block.h',
130 command: [module_block_py, '@OUTPUT0@', modsrc])
131 block_ss.add(module_block_h)
133 wrapper_py = find_program('../scripts/block-coroutine-wrapper.py')
134 block_gen_c = custom_target('block-gen.c',
135 output: 'block-gen.c',
137 '../include/block/block-io.h',
138 '../include/block/block-global-state.h',
141 command: [wrapper_py, '@OUTPUT@', '@INPUT@'])
142 block_ss.add(block_gen_c)
144 block_ss.add(files('stream.c'))
146 softmmu_ss.add(files('qapi-sysemu.c'))
151 modules += {'block': block_modules}