forked from gentoo-utils/gentoo-utils
move fuzz stuff into its own directory
This commit is contained in:
@@ -10,4 +10,8 @@ itertools = "0.14.0"
|
|||||||
thiserror = "2.0.17"
|
thiserror = "2.0.17"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
debug = true
|
debug = true
|
||||||
|
|
||||||
|
[[test]]
|
||||||
|
path = "fuzz/fuzz.rs"
|
||||||
|
name = "fuzz"
|
||||||
27
fuzz/meson.build
Normal file
27
fuzz/meson.build
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
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],
|
||||||
|
)
|
||||||
@@ -19,4 +19,6 @@ gentoo_utils = static_library(
|
|||||||
link_with: [thiserror],
|
link_with: [thiserror],
|
||||||
)
|
)
|
||||||
|
|
||||||
subdir('tests')
|
if get_option('fuzz').enabled()
|
||||||
|
subdir('fuzz')
|
||||||
|
endif
|
||||||
|
|||||||
@@ -1,27 +1 @@
|
|||||||
cbindgen = find_program('cbindgen')
|
subdir('fuzz')
|
||||||
|
|
||||||
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],
|
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user