[LLD][COFF] Ignore DEBUG_S_XFGHASH_TYPE/VIRTUAL
[llvm-project.git] / libcxx / utils / ci / oss-fuzz.sh
blob12149de87ce5b5288a71d252b5702b4709c29cc5
1 #!/bin/bash -eu
4 # This script runs the continuous fuzzing tests on OSS-Fuzz.
7 if [[ ${SANITIZER} = *undefined* ]]; then
8 CXXFLAGS="${CXXFLAGS} -fsanitize=unsigned-integer-overflow -fsanitize-trap=unsigned-integer-overflow"
9 fi
11 BUILD=cxx_build_dir
12 INSTALL=cxx_install_dir
14 mkdir ${BUILD}
15 cmake -S ${PWD} -B ${BUILD} \
16 -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
17 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
18 -DCMAKE_INSTALL_PREFIX="${INSTALL}"
19 cmake --build ${BUILD} --target install-cxx-headers
21 for test in libcxx/test/libcxx/fuzzing/*.pass.cpp; do
22 exe="$(basename ${test})"
23 exe="${exe%.pass.cpp}"
24 ${CXX} ${CXXFLAGS} \
25 -std=c++14 \
26 -DLIBCPP_OSS_FUZZ \
27 -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS \
28 -nostdinc++ -cxx-isystem ${INSTALL}/include/c++/v1 \
29 -lpthread -ldl \
30 -o "${OUT}/${exe}" \
31 ${test} \
32 ${LIB_FUZZING_ENGINE}
33 done