2021-10-07 15:08:12 +02:00
|
|
|
if not get_option('fuzzing')
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2023-02-05 05:29:50 +01:00
|
|
|
specific_fuzz_ss.add(files('fuzz.c', 'qos_fuzz.c',
|
2020-08-03 17:04:25 +02:00
|
|
|
'qtest_wrappers.c'), qos)
|
|
|
|
|
|
|
|
# Targets
|
|
|
|
specific_fuzz_ss.add(when: 'CONFIG_I440FX', if_true: files('i440fx_fuzz.c'))
|
|
|
|
specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio_net_fuzz.c'))
|
|
|
|
specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio_scsi_fuzz.c'))
|
2020-11-09 12:25:50 +01:00
|
|
|
specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio_blk_fuzz.c'))
|
2020-10-23 17:07:31 +02:00
|
|
|
specific_fuzz_ss.add(files('generic_fuzz.c'))
|
2020-08-03 17:04:25 +02:00
|
|
|
|
2023-02-05 05:29:50 +01:00
|
|
|
fuzz_ld = declare_dependency(
|
2021-10-07 15:08:12 +02:00
|
|
|
link_args: fuzz_exe_ldflags +
|
2020-09-02 19:36:51 +02:00
|
|
|
['-Wl,-wrap,qtest_inb',
|
2020-08-03 17:04:25 +02:00
|
|
|
'-Wl,-wrap,qtest_inw',
|
|
|
|
'-Wl,-wrap,qtest_inl',
|
|
|
|
'-Wl,-wrap,qtest_outb',
|
|
|
|
'-Wl,-wrap,qtest_outw',
|
|
|
|
'-Wl,-wrap,qtest_outl',
|
|
|
|
'-Wl,-wrap,qtest_readb',
|
|
|
|
'-Wl,-wrap,qtest_readw',
|
|
|
|
'-Wl,-wrap,qtest_readl',
|
|
|
|
'-Wl,-wrap,qtest_readq',
|
|
|
|
'-Wl,-wrap,qtest_writeb',
|
|
|
|
'-Wl,-wrap,qtest_writew',
|
|
|
|
'-Wl,-wrap,qtest_writel',
|
|
|
|
'-Wl,-wrap,qtest_writeq',
|
|
|
|
'-Wl,-wrap,qtest_memread',
|
|
|
|
'-Wl,-wrap,qtest_bufread',
|
|
|
|
'-Wl,-wrap,qtest_memwrite',
|
|
|
|
'-Wl,-wrap,qtest_bufwrite',
|
|
|
|
'-Wl,-wrap,qtest_memset']
|
|
|
|
)
|
|
|
|
|
2023-02-05 05:29:50 +01:00
|
|
|
specific_fuzz_ss.add(fuzz_ld)
|