xref: /openbmc/qemu/tests/qtest/fuzz/meson.build (revision 9921e3d3)
1specific_fuzz_ss.add(files('fuzz.c', 'fork_fuzz.c', 'qos_fuzz.c',
2                           'qtest_wrappers.c'), qos)
3
4# Targets
5specific_fuzz_ss.add(when: 'CONFIG_I440FX', if_true: files('i440fx_fuzz.c'))
6specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio_net_fuzz.c'))
7specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio_scsi_fuzz.c'))
8
9# unfortunately declare_dependency does not support link_depends, so
10# this will be duplicated in meson.build
11fork_fuzz = declare_dependency(
12  link_args: ['-fsanitize=fuzzer',
13              '-Wl,-T,' + (meson.current_source_dir() / 'fork_fuzz.ld'),
14              '-Wl,-wrap,qtest_inb',
15              '-Wl,-wrap,qtest_inw',
16              '-Wl,-wrap,qtest_inl',
17              '-Wl,-wrap,qtest_outb',
18              '-Wl,-wrap,qtest_outw',
19              '-Wl,-wrap,qtest_outl',
20              '-Wl,-wrap,qtest_readb',
21              '-Wl,-wrap,qtest_readw',
22              '-Wl,-wrap,qtest_readl',
23              '-Wl,-wrap,qtest_readq',
24              '-Wl,-wrap,qtest_writeb',
25              '-Wl,-wrap,qtest_writew',
26              '-Wl,-wrap,qtest_writel',
27              '-Wl,-wrap,qtest_writeq',
28              '-Wl,-wrap,qtest_memread',
29              '-Wl,-wrap,qtest_bufread',
30              '-Wl,-wrap,qtest_memwrite',
31              '-Wl,-wrap,qtest_bufwrite',
32              '-Wl,-wrap,qtest_memset']
33)
34
35specific_fuzz_ss.add(fork_fuzz)
36