diff --git a/meson.build b/meson.build index b6eb58797..235fa7fb2 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/meson_options.txt b/meson_options.txt index 0bed82234..f887cb170 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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