meson_options.txt: add option "libfuzzer"

This option allows disabling libFuzzer, which is required to run the
fuzzers with Honggfuzz.
This commit is contained in:
Max Kellermann
2022-10-20 18:26:57 +02:00
parent bc51bc2933
commit c2d202e9b0
2 changed files with 6 additions and 2 deletions

View File

@@ -139,7 +139,10 @@ if get_option('buildtype') != 'debug'
endif
if get_option('fuzzer')
fuzzer_flags = ['-fsanitize=fuzzer']
fuzzer_flags = []
if get_option('libfuzzer')
fuzzer_flags += ['-fsanitize=fuzzer']
endif
if get_option('b_sanitize') == 'none'
fuzzer_flags += ['-fsanitize=address,undefined']
endif