]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tools: make it possible to set all the fuzzing flags with config-gen
authorEvgeny Vereshchagin <evvers@ya.ru>
Tue, 28 Jul 2020 11:23:50 +0000 (11:23 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Thu, 6 Aug 2020 12:33:11 +0000 (12:33 +0000)
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 <evvers@ya.ru>
tools/config-gen
tools/config-gen.d/fuzz.conf [new file with mode: 0644]

index bf638e8ee7792794f407933d593a50d7143c26d6..1fd58a02bd9cf7a373908335de3624d86e9bfefb 100755 (executable)
@@ -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 (file)
index 0000000..b1d8eda
--- /dev/null
@@ -0,0 +1,4 @@
+include:devel.conf
+
+--enable-ubsan
+--enable-fuzzing-engine