set clang in one place

This commit is contained in:
Paul Dreik 2021-08-21 14:24:45 +02:00 committed by Victor Zverovich
parent 7af1dc1d27
commit 6b5e6119ee

View File

@ -22,6 +22,8 @@ here=$(pwd)
CXXFLAGSALL="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION= -g" CXXFLAGSALL="-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION= -g"
CMAKEFLAGSALL="$root -GNinja -DCMAKE_BUILD_TYPE=Debug -DFMT_DOC=Off -DFMT_TEST=Off -DFMT_FUZZ=On -DCMAKE_CXX_STANDARD=17" CMAKEFLAGSALL="$root -GNinja -DCMAKE_BUILD_TYPE=Debug -DFMT_DOC=Off -DFMT_TEST=Off -DFMT_FUZZ=On -DCMAKE_CXX_STANDARD=17"
CLANG=clang++-11
# For performance analysis of the fuzzers. # For performance analysis of the fuzzers.
builddir=$here/build-fuzzers-perfanalysis builddir=$here/build-fuzzers-perfanalysis
mkdir -p $builddir mkdir -p $builddir
@ -37,7 +39,7 @@ cmake --build $builddir
builddir=$here/build-fuzzers-ossfuzz builddir=$here/build-fuzzers-ossfuzz
mkdir -p $builddir mkdir -p $builddir
cd $builddir cd $builddir
CXX="clang++" \ CXX=$CLANG \
CXXFLAGS="$CXXFLAGSALL -fsanitize=fuzzer-no-link" cmake \ CXXFLAGS="$CXXFLAGSALL -fsanitize=fuzzer-no-link" cmake \
cmake $CMAKEFLAGSALL \ cmake $CMAKEFLAGSALL \
-DFMT_FUZZ_LINKMAIN=Off \ -DFMT_FUZZ_LINKMAIN=Off \
@ -50,7 +52,7 @@ cmake --build $builddir
builddir=$here/build-fuzzers-libfuzzer builddir=$here/build-fuzzers-libfuzzer
mkdir -p $builddir mkdir -p $builddir
cd $builddir cd $builddir
CXX="clang++" \ CXX=$CLANG \
CXXFLAGS="$CXXFLAGSALL -fsanitize=fuzzer-no-link,address,undefined" cmake \ CXXFLAGS="$CXXFLAGSALL -fsanitize=fuzzer-no-link,address,undefined" cmake \
cmake $CMAKEFLAGSALL \ cmake $CMAKEFLAGSALL \
-DFMT_FUZZ_LINKMAIN=Off \ -DFMT_FUZZ_LINKMAIN=Off \
@ -62,7 +64,7 @@ cmake --build $builddir
builddir=$here/build-fuzzers-fast builddir=$here/build-fuzzers-fast
mkdir -p $builddir mkdir -p $builddir
cd $builddir cd $builddir
CXX="clang++" \ CXX=$CLANG \
CXXFLAGS="$CXXFLAGSALL -fsanitize=fuzzer-no-link -O3" cmake \ CXXFLAGS="$CXXFLAGSALL -fsanitize=fuzzer-no-link -O3" cmake \
cmake $CMAKEFLAGSALL \ cmake $CMAKEFLAGSALL \
-DFMT_FUZZ_LINKMAIN=Off \ -DFMT_FUZZ_LINKMAIN=Off \