xref: /openbmc/qemu/tests/qtest/fuzz/meson.build (revision 9ea2e69f)
1if not get_option('fuzzing')
2  subdir_done()
3endif
4
5specific_fuzz_ss.add(files('fuzz.c', 'qos_fuzz.c',
6                           'qtest_wrappers.c'), qos)
7
8# Targets
9specific_fuzz_ss.add(when: 'CONFIG_I440FX', if_true: files('i440fx_fuzz.c'))
10specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio_net_fuzz.c'))
11specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio_scsi_fuzz.c'))
12specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio_blk_fuzz.c'))
13specific_fuzz_ss.add(files('generic_fuzz.c'))
14
15fuzz_ld = declare_dependency(
16  link_args: fuzz_exe_ldflags +
17             ['-Wl,-wrap,qtest_inb',
18              '-Wl,-wrap,qtest_inw',
19              '-Wl,-wrap,qtest_inl',
20              '-Wl,-wrap,qtest_outb',
21              '-Wl,-wrap,qtest_outw',
22              '-Wl,-wrap,qtest_outl',
23              '-Wl,-wrap,qtest_readb',
24              '-Wl,-wrap,qtest_readw',
25              '-Wl,-wrap,qtest_readl',
26              '-Wl,-wrap,qtest_readq',
27              '-Wl,-wrap,qtest_writeb',
28              '-Wl,-wrap,qtest_writew',
29              '-Wl,-wrap,qtest_writel',
30              '-Wl,-wrap,qtest_writeq',
31              '-Wl,-wrap,qtest_memread',
32              '-Wl,-wrap,qtest_bufread',
33              '-Wl,-wrap,qtest_memwrite',
34              '-Wl,-wrap,qtest_bufwrite',
35              '-Wl,-wrap,qtest_memset']
36)
37
38specific_fuzz_ss.add(fuzz_ld)
39