aboutsummaryrefslogtreecommitdiff
path: root/projects/solidity
diff options
context:
space:
mode:
authorBhargava Shastry <bshas3@gmail.com>2019-07-16 15:10:45 +0200
committerjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2019-07-16 06:10:45 -0700
commitca11c5128c8ed9630e1deeff84d78bd5182cbdff (patch)
treec7ea3eb3bd5ec48c96f79b69edd4e4d1592b856e /projects/solidity
parent0619a50b4dac0e8a17be6daadcb7ebab2ac3e8fa (diff)
downloadoss-fuzz-ca11c5128c8ed9630e1deeff84d78bd5182cbdff.tar.gz
Install protobuf-mutator toolchain before building solidity (#2611)
Diffstat (limited to 'projects/solidity')
-rw-r--r--projects/solidity/Dockerfile4
-rwxr-xr-xprojects/solidity/build.sh3
2 files changed, 3 insertions, 4 deletions
diff --git a/projects/solidity/Dockerfile b/projects/solidity/Dockerfile
index eff72f6af..3e78860cc 100644
--- a/projects/solidity/Dockerfile
+++ b/projects/solidity/Dockerfile
@@ -16,10 +16,10 @@
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y make autoconf automake libtool \
- build-essential cmake libbz2-dev ninja-build zlib1g-dev
+ build-essential cmake libbz2-dev ninja-build zlib1g-dev wget
RUN git clone --recursive https://github.com/ethereum/solidity.git solidity
RUN git clone --depth 1 https://github.com/ethereum/solidity-fuzzing-corpus.git
RUN git clone --recursive -b boost-1.69.0 https://github.com/boostorg/boost.git boost
RUN git clone --depth 1 https://github.com/google/libprotobuf-mutator.git
-RUN (mkdir LPM && cd LPM && cmake ../libprotobuf-mutator -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON -DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release && ninja)
+RUN (mkdir LPM && cd LPM && cmake ../libprotobuf-mutator -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON -DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr" && ninja && ninja install && cd external.protobuf && cp -Rf bin lib include /usr)
COPY build.sh $SRC/
diff --git a/projects/solidity/build.sh b/projects/solidity/build.sh
index 857c97a8b..3ce2930d5 100755
--- a/projects/solidity/build.sh
+++ b/projects/solidity/build.sh
@@ -27,8 +27,7 @@ cd $SRC/boost
# Compile proto C++ bindings
-cd $SRC
-LPM/external.protobuf/bin/protoc \
+protoc \
--proto_path=$SRC/solidity/test/tools/ossfuzz yulProto.proto \
--cpp_out=$SRC/solidity/test/tools/ossfuzz