mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
e04b890817
This adds scripts and Dockerfiles to run the fuzzing process standalone or with OSS-Fuzz/ClusterFuzzLite integrations.
22 lines
551 B
Bash
22 lines
551 B
Bash
#!/bin/bash -eu
|
|
|
|
# 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
|
|
|
|
# build fuzzer target
|
|
cmake --build ./ --target bootstrap_fuzzer
|
|
|
|
# copy to output files
|
|
cp "$WORK"/bootstrap_fuzzer "$OUT"/
|