From 02f5fc1407390e414b7a6902f541b89a7a77981b Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Tue, 28 Jul 2020 11:23:50 +0000 Subject: [PATCH] tools: make it possible to set all the fuzzing flags with config-gen so that the fuzz targets (along with everything else) can be built and run with: ``` ./tools/config-gen fuzz make check ``` Signed-off-by: Evgeny Vereshchagin --- tools/config-gen | 4 ++++ tools/config-gen.d/fuzz.conf | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 tools/config-gen.d/fuzz.conf diff --git a/tools/config-gen b/tools/config-gen index bf638e8ee7..1fd58a02bd 100755 --- a/tools/config-gen +++ b/tools/config-gen @@ -23,6 +23,10 @@ fi while [ -n "$1" ]; do opts="$opts $(ul_get_configuration tools/config-gen.d/$1.conf)" + if [ "$1" == "fuzz" ]; then + export CC=${CC:-clang} + export CXX=${CXX:-clang++} + fi shift done diff --git a/tools/config-gen.d/fuzz.conf b/tools/config-gen.d/fuzz.conf new file mode 100644 index 0000000000..b1d8edae8c --- /dev/null +++ b/tools/config-gen.d/fuzz.conf @@ -0,0 +1,4 @@ +include:devel.conf + +--enable-ubsan +--enable-fuzzing-engine -- 2.47.3