2019-06-25 16:22:02 +00:00
|
|
|
#!/bin/bash -eu
|
|
|
|
|
|
|
|
# This script is called by the oss-fuzz main project when compiling the fuzz
|
|
|
|
# targets. This script is regression tested by travisoss.sh.
|
|
|
|
|
|
|
|
# Save off the current folder as the build root.
|
|
|
|
export BUILD_ROOT=$PWD
|
|
|
|
|
|
|
|
echo "CC: $CC"
|
|
|
|
echo "CXX: $CXX"
|
|
|
|
echo "LIB_FUZZING_ENGINE: $LIB_FUZZING_ENGINE"
|
|
|
|
echo "CFLAGS: $CFLAGS"
|
2019-06-28 19:54:46 +00:00
|
|
|
echo "CXXFLAGS: $CXXFLAGS"
|
2019-06-25 16:22:02 +00:00
|
|
|
echo "OUT: $OUT"
|
|
|
|
|
|
|
|
export MAKEFLAGS+="-j$(nproc)"
|
|
|
|
|
|
|
|
pushd ossfuzz
|
2019-07-18 00:41:41 +00:00
|
|
|
make V=1 all
|
2019-06-25 16:22:02 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
# Copy the fuzzers to the target directory.
|
2019-07-18 00:41:41 +00:00
|
|
|
cp -v ossfuzz/*_fuzzer $OUT/
|