Squashed 'external/toxcore/c-toxcore/' content from commit 67badf69
git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 67badf69416a74e74f6d7eb51dd96f37282b8455
This commit is contained in:
26
.clusterfuzzlite/Dockerfile
Normal file
26
.clusterfuzzlite/Dockerfile
Normal file
@ -0,0 +1,26 @@
|
||||
# c-toxcore Clusterfuzzlite build environment
|
||||
|
||||
# We want to use the latest tools always
|
||||
FROM gcr.io/oss-fuzz-base/base-builder:latest
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get -y install --no-install-suggests --no-install-recommends \
|
||||
cmake libtool autoconf automake pkg-config \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Static builds of dependencies
|
||||
|
||||
# libsodium
|
||||
RUN git clone --depth 1 --branch 1.0.18 https://github.com/jedisct1/libsodium libsodium
|
||||
WORKDIR $SRC/libsodium
|
||||
RUN ./autogen.sh && ./configure --enable-shared=no && make install
|
||||
WORKDIR $SRC
|
||||
|
||||
# Copy your project's source code.
|
||||
COPY . $SRC/c-toxcore
|
||||
# Working directory for build.sh.
|
||||
WORKDIR $SRC/c-toxcore
|
||||
RUN git submodule update --init --recursive
|
||||
# Copy build.sh into $SRC dir.
|
||||
COPY ./.clusterfuzzlite/build.sh $SRC/
|
25
.clusterfuzzlite/build.sh
Normal file
25
.clusterfuzzlite/build.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
FUZZ_TARGETS="bootstrap_fuzzer toxsave_fuzzer"
|
||||
|
||||
# out of tree build
|
||||
cd "$WORK"
|
||||
|
||||
ls /usr/local/lib/
|
||||
|
||||
# Debug build for asserts
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_CXX_COMPILER="$CXX" \
|
||||
-DCMAKE_C_FLAGS="$CFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="$LIB_FUZZING_ENGINE" \
|
||||
-DBUILD_TOXAV=OFF -DENABLE_SHARED=NO -DBUILD_FUZZ_TESTS=ON \
|
||||
-DDHT_BOOTSTRAP=OFF -DBOOTSTRAP_DAEMON=OFF "$SRC"/c-toxcore
|
||||
|
||||
for TARGET in $FUZZ_TARGETS; do
|
||||
# build fuzzer target
|
||||
cmake --build ./ --target "$TARGET"
|
||||
|
||||
# copy to output files
|
||||
cp "$WORK/testing/fuzzing/$TARGET" "$OUT"/
|
||||
done
|
Reference in New Issue
Block a user