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

View File

@ -18,7 +18,8 @@ option('systemd_user_unit_dir', type: 'string', description: 'systemd user servi
#
option('test', type: 'boolean', value: false, description: 'Build the unit tests and debug programs')
option('fuzzer', type: 'boolean', value: false, description: 'Build fuzzers (requires libFuzzer)')
option('fuzzer', type: 'boolean', value: false, description: 'Build fuzzers')
option('libfuzzer', type: 'boolean', value: true, description: 'Enable libFuzzer support for the fuzzers')
#
# Android