[libcxx-commits] [libcxx] d95a4b9 - [libc++] Try to fix the oss-fuzz failure

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 25 09:50:59 PDT 2021


Author: Louis Dionne
Date: 2021-05-25T12:52:22-04:00
New Revision: d95a4b950dd38c745ef98e0f22ff22755196571d

URL: https://github.com/llvm/llvm-project/commit/d95a4b950dd38c745ef98e0f22ff22755196571d
DIFF: https://github.com/llvm/llvm-project/commit/d95a4b950dd38c745ef98e0f22ff22755196571d.diff

LOG: [libc++] Try to fix the oss-fuzz failure

Added: 
    

Modified: 
    libcxx/utils/ci/oss-fuzz.sh

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/ci/oss-fuzz.sh b/libcxx/utils/ci/oss-fuzz.sh
index 50c63b4bec198..12149de87ce5b 100755
--- a/libcxx/utils/ci/oss-fuzz.sh
+++ b/libcxx/utils/ci/oss-fuzz.sh
@@ -8,6 +8,16 @@ if [[ ${SANITIZER} = *undefined* ]]; then
   CXXFLAGS="${CXXFLAGS} -fsanitize=unsigned-integer-overflow -fsanitize-trap=unsigned-integer-overflow"
 fi
 
+BUILD=cxx_build_dir
+INSTALL=cxx_install_dir
+
+mkdir ${BUILD}
+cmake -S ${PWD} -B ${BUILD} \
+      -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
+      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+      -DCMAKE_INSTALL_PREFIX="${INSTALL}"
+cmake --build ${BUILD} --target install-cxx-headers
+
 for test in libcxx/test/libcxx/fuzzing/*.pass.cpp; do
     exe="$(basename ${test})"
     exe="${exe%.pass.cpp}"
@@ -15,7 +25,7 @@ for test in libcxx/test/libcxx/fuzzing/*.pass.cpp; do
         -std=c++14 \
         -DLIBCPP_OSS_FUZZ \
         -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS \
-        -nostdinc++ -cxx-isystem libcxx/include \
+        -nostdinc++ -cxx-isystem ${INSTALL}/include/c++/v1 \
         -lpthread -ldl \
         -o "${OUT}/${exe}" \
         ${test} \


        


More information about the libcxx-commits mailing list