Skip to content

Commit

Permalink
oss-fuzz: always place build dirs in $WORK, not $SRC
Browse files Browse the repository at this point in the history
  • Loading branch information
LebedevRI committed Apr 30, 2024
1 parent e30968a commit 1fed7dc
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .ci/oss-fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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"

0 comments on commit 1fed7dc

Please sign in to comment.