accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE
[qemu/rayw.git] / block / meson.build
blobe42bcb58d5c1b58599b6b4936b13450c7c39482f
1 block_ss.add(genh)
2 block_ss.add(files(
3   'accounting.c',
4   'aio_task.c',
5   'amend.c',
6   'backup.c',
7   'copy-before-write.c',
8   'blkdebug.c',
9   'blklogwrites.c',
10   'blkverify.c',
11   'block-backend.c',
12   'block-copy.c',
13   'commit.c',
14   'copy-on-read.c',
15   'preallocate.c',
16   'progress_meter.c',
17   'create.c',
18   'crypto.c',
19   'dirty-bitmap.c',
20   'filter-compress.c',
21   'io.c',
22   'mirror.c',
23   'nbd.c',
24   'null.c',
25   'qapi.c',
26   'qcow2-bitmap.c',
27   'qcow2-cache.c',
28   'qcow2-cluster.c',
29   'qcow2-refcount.c',
30   'qcow2-snapshot.c',
31   'qcow2-threads.c',
32   'qcow2.c',
33   'quorum.c',
34   'raw-format.c',
35   'snapshot.c',
36   'throttle-groups.c',
37   'throttle.c',
38   'vhdx-endian.c',
39   'vhdx-log.c',
40   'vhdx.c',
41   'vmdk.c',
42   'vpc.c',
43   'write-threshold.c',
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'))
50 endif
51 if get_option('vdi').allowed()
52   block_ss.add(files('vdi.c'))
53 endif
54 if get_option('cloop').allowed()
55   block_ss.add(files('cloop.c'))
56 endif
57 if get_option('bochs').allowed()
58   block_ss.add(files('bochs.c'))
59 endif
60 if get_option('vvfat').allowed()
61   block_ss.add(files('vvfat.c'))
62 endif
63 if get_option('dmg').allowed()
64   block_ss.add(files('dmg.c'))
65 endif
66 if get_option('qed').allowed()
67   block_ss.add(files(
68     'qed-check.c',
69     'qed-cluster.c',
70     'qed-l2-cache.c',
71     'qed-table.c',
72     'qed.c',
73   ))
74 endif
75 if get_option('parallels').allowed()
76   block_ss.add(files('parallels.c', 'parallels-ext.c'))
77 endif
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'))
85 endif
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'))
89 block_modules = {}
91 modsrc = []
92 foreach m : [
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')],
100   if m[0].found()
101     module_ss = ss.source_set()
102     module_ss.add(when: m[0], if_true: m[2])
103     if enable_modules
104       modsrc += module_ss.all_sources()
105     endif
106     block_modules += {m[1] : module_ss}
107   endif
108 endforeach
110 # those are not exactly regular block modules, so treat them apart
111 if get_option('dmg').allowed()
112   foreach m : [
113     [liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
114     [libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
115   ]
116     if m[0].found()
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}
120     endif
121   endforeach
122 endif
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',
127                                input: modsrc,
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(
135                                       '../include/block/block-io.h',
136                                       '../include/block/block-global-state.h',
137                                       'coroutines.h'
138                                       ),
139                             command: [wrapper_py, '@OUTPUT@', '@INPUT@'])
140 block_ss.add(block_gen_c)
142 block_ss.add(files('stream.c'))
144 softmmu_ss.add(files('qapi-sysemu.c'))
146 subdir('export')
147 subdir('monitor')
149 modules += {'block': block_modules}