scripts/oss-fuzz: rename bin/qemu-fuzz-i386
[qemu/ar7.git] / block / meson.build
blob5dcc1e5cceb0ca05e382ebc265d3bac1ecf8b9a2
1 block_ss.add(genh)
2 block_ss.add(files(
3   'accounting.c',
4   'aio_task.c',
5   'amend.c',
6   'backup.c',
7   'backup-top.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   'create.c',
16   'crypto.c',
17   'dirty-bitmap.c',
18   'filter-compress.c',
19   'io.c',
20   'mirror.c',
21   'nbd.c',
22   'null.c',
23   'qapi.c',
24   'qcow2-bitmap.c',
25   'qcow2-cache.c',
26   'qcow2-cluster.c',
27   'qcow2-refcount.c',
28   'qcow2-snapshot.c',
29   'qcow2-threads.c',
30   'qcow2.c',
31   'quorum.c',
32   'raw-format.c',
33   'snapshot.c',
34   'throttle-groups.c',
35   'throttle.c',
36   'vhdx-endian.c',
37   'vhdx-log.c',
38   'vhdx.c',
39   'vmdk.c',
40   'vpc.c',
41   'write-threshold.c',
42 ), zstd, zlib)
44 softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
46 block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c'))
47 block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c'))
48 block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
49 block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c'))
50 block_ss.add(when: 'CONFIG_VVFAT', if_true: files('vvfat.c'))
51 block_ss.add(when: 'CONFIG_DMG', if_true: files('dmg.c'))
52 block_ss.add(when: 'CONFIG_QED', if_true: files(
53   'qed-check.c',
54   'qed-cluster.c',
55   'qed-l2-cache.c',
56   'qed-table.c',
57   'qed.c',
59 block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'], if_true: files('parallels.c'))
60 block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-aio.c'))
61 block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit])
62 block_ss.add(when: 'CONFIG_LIBISCSI', if_true: files('iscsi-opts.c'))
63 block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
64 block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c'))
65 block_ss.add(when: 'CONFIG_SHEEPDOG', if_true: files('sheepdog.c'))
66 block_ss.add(when: ['CONFIG_LINUX_AIO', libaio], if_true: files('linux-aio.c'))
67 block_ss.add(when: ['CONFIG_LINUX_IO_URING', linux_io_uring], if_true: files('io_uring.c'))
69 block_modules = {}
71 modsrc = []
72 foreach m : [
73   ['CONFIG_CURL', 'curl', [curl, glib], 'curl.c'],
74   ['CONFIG_GLUSTERFS', 'gluster', glusterfs, 'gluster.c'],
75   ['CONFIG_LIBISCSI', 'iscsi', libiscsi, 'iscsi.c'],
76   ['CONFIG_LIBNFS', 'nfs', libnfs, 'nfs.c'],
77   ['CONFIG_LIBSSH', 'ssh', libssh, 'ssh.c'],
78   ['CONFIG_RBD', 'rbd', rbd, 'rbd.c'],
80   if config_host.has_key(m[0])
81     if enable_modules
82       modsrc += files(m[3])
83     endif
84     module_ss = ss.source_set()
85     module_ss.add(when: m[2], if_true: files(m[3]))
86     block_modules += {m[1] : module_ss}
87   endif
88 endforeach
90 # those are not exactly regular block modules, so treat them apart
91 if 'CONFIG_DMG' in config_host
92   foreach m : [
93     ['CONFIG_LZFSE', 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'],
94     ['CONFIG_BZIP2', 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c']
95   ]
96     if config_host.has_key(m[0])
97       module_ss = ss.source_set()
98       module_ss.add(when: m[2], if_true: files(m[3]))
99       block_modules += {m[1] : module_ss}
100     endif
101   endforeach
102 endif
104 module_block_py = find_program('../scripts/modules/module_block.py')
105 module_block_h = custom_target('module_block.h',
106                                output: 'module_block.h',
107                                input: modsrc,
108                                command: [module_block_py, '@OUTPUT0@', modsrc])
109 block_ss.add(module_block_h)
111 wrapper_py = find_program('../scripts/block-coroutine-wrapper.py')
112 block_gen_c = custom_target('block-gen.c',
113                             output: 'block-gen.c',
114                             input: files('../include/block/block.h',
115                                          'coroutines.h'),
116                             command: [wrapper_py, '@OUTPUT@', '@INPUT@'])
117 block_ss.add(block_gen_c)
119 block_ss.add(files('stream.c'))
121 softmmu_ss.add(files('qapi-sysemu.c'))
123 subdir('export')
124 subdir('monitor')
126 modules += {'block': block_modules}