From c2d202e9b00d554bef1bb4d6195957f9468a8ec6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 20 Oct 2022 18:26:57 +0200 Subject: [PATCH] meson_options.txt: add option "libfuzzer" This option allows disabling libFuzzer, which is required to run the fuzzers with Honggfuzz. --- meson.build | 5 ++++- meson_options.txt | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) 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