solidity/scripts/ci/build_ossfuzz.sh
2020-07-14 19:00:48 -05:00

16 lines
564 B
Bash
Executable File

#!/usr/bin/env bash
set -e
ROOTDIR="$(dirname "$0")/../.."
BUILDDIR="${ROOTDIR}/build"
mkdir -p "${BUILDDIR}"
cd "${BUILDDIR}"
protoc --proto_path=../test/tools/ossfuzz yulProto.proto --cpp_out=../test/tools/ossfuzz
protoc --proto_path=../test/tools/ossfuzz abiV2Proto.proto --cpp_out=../test/tools/ossfuzz
protoc --proto_path=../test/tools/ossfuzz solProto.proto --cpp_out=../test/tools/ossfuzz
cmake .. -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Release}" -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/libfuzzer.cmake
make ossfuzz ossfuzz_proto ossfuzz_abiv2 -j 4