forked from gentoo-utils/gentoo-utils
28 lines
583 B
Meson
28 lines
583 B
Meson
cbindgen = find_program('cbindgen')
|
|
|
|
fuzz_h = custom_target(
|
|
'fuzz_h',
|
|
input: 'fuzz.rs',
|
|
output: 'fuzz.h',
|
|
command: [cbindgen, '@INPUT@', '-o', '@OUTPUT'],
|
|
)
|
|
|
|
fuzz_rs = static_library(
|
|
'fuzz_rs',
|
|
'fuzz.rs',
|
|
rust_abi: 'c',
|
|
rust_args: [
|
|
'-Cpasses=sancov-module',
|
|
'-Cllvm-args=-sanitizer-coverage-level=3',
|
|
'-Cllvm-args=-sanitizer-coverage-inline-8bit-counters',
|
|
],
|
|
dependencies: [mon],
|
|
link_with: [gentoo_utils],
|
|
)
|
|
|
|
fuzz_cpp = executable(
|
|
'fuzz',
|
|
link_args: ['-fsanitize=fuzzer'],
|
|
link_with: [fuzz_rs],
|
|
)
|