Debian Codegraph @

tests/ossfuzz/ossfuzz.sh

raw
1 #!/usr/bin/env bash
2
3 set -eu
4
5 # This script is called by the oss-fuzz main project when compiling the fuzz
6 # targets. This script is regression tested by ci/ossfuzz.sh.
7
8 # Save off the current folder as the build root.
9 export BUILD_ROOT="$PWD"
10
11 echo "CC: $CC"
12 echo "CXX: $CXX"
13 echo "LIB_FUZZING_ENGINE: $LIB_FUZZING_ENGINE"
14 echo "CFLAGS: $CFLAGS"
15 echo "CXXFLAGS: $CXXFLAGS"
16 echo "OUT: $OUT"
17
18 MAKEFLAGS+="-j$(nproc)"
19 export MAKEFLAGS
20
21 # Install dependencies
22 apt-get -y install automake libtool libssl-dev zlib1g-dev
23
24 # Compile the fuzzer.
25 autoreconf -fi
26 ./configure --disable-shared \
27 --enable-ossfuzzers \
28 --disable-examples-build \
29 --enable-debug
30 make V=1
31
32 # Copy the fuzzer to the output directory.
33 cp -v tests/ossfuzz/ssh2_client_fuzzer "$OUT/"