qemu/tests/qtest/fuzz/meson.build
Alexander Bulekov c46f76d158 meson: specify fuzz linker script as a project arg
With this change, the fuzzer-linker script should be specified outside
any --start-group/--end-group pairs. We need this on oss-fuzz, where
partially applying the linker-script results in a linker failure

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20200902173652.307222-2-alxndr@bu.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-08 11:43:16 +02:00

32 lines
1.2 KiB
Meson

specific_fuzz_ss.add(files('fuzz.c', 'fork_fuzz.c', 'qos_fuzz.c',
'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'))
fork_fuzz = declare_dependency(
link_args: ['-fsanitize=fuzzer',
'-Wl,-wrap,qtest_inb',
'-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']
)
specific_fuzz_ss.add(fork_fuzz)