[JITLink][AArch32] Implement Armv5 ldr-pc stubs and use them for all pre-v7 targets...
[llvm-project.git] / libcxx / utils / ci / oss-fuzz.sh
blobd5e7fcea6012e34b529aa9d9725d1c5795f08abb
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
13 MONOREPO_ROOT=${PWD}
15 mkdir ${BUILD}
16 cmake -S ${MONOREPO_ROOT}/runtimes -B ${BUILD} \
17 -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
18 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
19 -DCMAKE_INSTALL_PREFIX="${INSTALL}"
20 cmake --build ${BUILD} --target install-cxx-headers
22 for test in libcxx/test/libcxx/fuzzing/*.pass.cpp; do
23 exe="$(basename ${test})"
24 exe="${exe%.pass.cpp}"
25 ${CXX} ${CXXFLAGS} \
26 -std=c++14 \
27 -DLIBCPP_OSS_FUZZ \
28 -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS \
29 -nostdinc++ -cxx-isystem ${INSTALL}/include/c++/v1 \
30 -lpthread -ldl \
31 -o "${OUT}/${exe}" \
32 ${test} \
33 ${LIB_FUZZING_ENGINE}
34 done