From 1fed7dc81e6492db38b6469c759b6adc7e918d13 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Sat, 17 Feb 2024 21:31:04 +0300 Subject: [PATCH] oss-fuzz: always place build dirs in `$WORK`, not `$SRC` --- .ci/oss-fuzz.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.ci/oss-fuzz.sh b/.ci/oss-fuzz.sh index dae6da4e7..c1bb11277 100755 --- a/.ci/oss-fuzz.sh +++ b/.ci/oss-fuzz.sh @@ -23,12 +23,11 @@ export CMAKE_GENERATOR=Ninja ln -f -s /usr/local/bin/lld /usr/bin/ld cd "$SRC" - wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.6/llvm-project-16.0.6.src.tar.xz tar -xf llvm-project-16.0.6.src.tar.xz llvm-project-16.0.6.src/{runtimes,cmake,llvm/cmake,libcxx,libcxxabi}/ -LIBCXX_BUILD="$SRC/llvm-project-16.0.6.build" -mkdir "$LIBCXX_BUILD" -cmake -S llvm-project-16.0.6.src/runtimes/ -B "$LIBCXX_BUILD" \ +LIBCXX_SOURCE="$SRC/llvm-project-16.0.6.src" +LIBCXX_BUILD="$WORK/llvm-project-16.0.6" +cmake -S "$LIBCXX_SOURCE/runtimes/" -B "$LIBCXX_BUILD" \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=OFF \ -DLLVM_INCLUDE_TESTS=OFF \ @@ -55,11 +54,10 @@ if [[ $SANITIZER = *memory* ]]; then WITH_OPENMP=OFF fi -cd "$WORK" -mkdir build -cd build +RAWSPEED_SOURCE="$SRC/librawspeed/" +RAWSPEED_BUILD="$WORK/rawspeed" -cmake \ +cmake -S "$RAWSPEED_SOURCE" -B "$RAWSPEED_BUILD" \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DRAWSPEED_ENABLE_DEBUG_INFO=OFF \ -DBINARY_PACKAGE_BUILD=ON -DWITH_OPENMP=$WITH_OPENMP \ -DUSE_BUNDLED_LLVMOPENMP=ON -DALLOW_DOWNLOADING_LLVMOPENMP=ON \ @@ -70,7 +68,8 @@ cmake \ -DCMAKE_INSTALL_PREFIX:PATH="$OUT" -DCMAKE_INSTALL_BINDIR:PATH="$OUT" \ "$SRC/librawspeed/" -cmake --build . -- -j$(nproc) all && cmake --build . -- -j$(nproc) install +cmake --build "$RAWSPEED_BUILD" -- -j$(nproc) all && cmake --build "$RAWSPEED_BUILD" -- -j$(nproc) install -du -hcs . -du -hcs "$OUT" +du -hcs "$SRC"/* \ + "$WORK"/* \ + "$OUT"