mirror of https://github.com/google/oss-fuzz.git
solidity: Upgrade boost (#4546)
This commit is contained in:
parent
b10939e212
commit
bca4ff4ee8
|
@ -17,27 +17,29 @@
|
||||||
FROM gcr.io/oss-fuzz-base/base-builder
|
FROM gcr.io/oss-fuzz-base/base-builder
|
||||||
RUN apt-get update && apt-get install -y make autoconf automake libtool \
|
RUN apt-get update && apt-get install -y make autoconf automake libtool \
|
||||||
build-essential libbz2-dev ninja-build zlib1g-dev wget python python-dev \
|
build-essential libbz2-dev ninja-build zlib1g-dev wget python python-dev \
|
||||||
liblzma-dev uuid-dev pkg-config openjdk-8-jdk unzip
|
liblzma-dev uuid-dev pkg-config openjdk-8-jdk unzip mlton
|
||||||
|
|
||||||
RUN git clone --recursive https://github.com/ethereum/solidity.git solidity
|
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 --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 git clone --depth 1 https://github.com/google/libprotobuf-mutator.git
|
||||||
RUN git clone --branch="v0.4.0" --recurse-submodules \
|
RUN git clone --branch="v0.4.0" --recurse-submodules \
|
||||||
https://github.com/ethereum/evmone.git
|
https://github.com/ethereum/evmone.git
|
||||||
|
|
||||||
# Install statically built dependencies in "/usr" directory
|
# Install statically built dependencies in "/usr" directory
|
||||||
# Install boost
|
# Install boost
|
||||||
RUN cd $SRC/boost; \
|
RUN cd $SRC; \
|
||||||
./bootstrap.sh --with-toolset=clang --prefix=/usr; \
|
wget -q 'https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.bz2' -O boost.tar.bz2; \
|
||||||
./b2 clean; \
|
test "$(sha256sum boost.tar.bz2)" = "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 boost.tar.bz2"; \
|
||||||
./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" \
|
tar -xf boost.tar.bz2; \
|
||||||
headers; \
|
rm boost.tar.bz2; \
|
||||||
./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" \
|
cd boost_1_73_0; \
|
||||||
link=static variant=release runtime-link=static \
|
CXXFLAGS="-stdlib=libc++ -pthread" LDFLAGS="-stdlib=libc++" ./bootstrap.sh --with-toolset=clang --prefix=/usr; \
|
||||||
system regex filesystem unit_test_framework program_options \
|
./b2 toolset=clang cxxflags="-stdlib=libc++ -pthread" linkflags="-stdlib=libc++ -pthread" headers; \
|
||||||
install -j $(($(nproc)/2));
|
./b2 toolset=clang cxxflags="-stdlib=libc++ -pthread" linkflags="-stdlib=libc++ -pthread" \
|
||||||
|
link=static variant=release runtime-link=static \
|
||||||
|
system filesystem unit_test_framework program_options \
|
||||||
|
install -j $(($(nproc)/2)); \
|
||||||
|
rm -rf $SRC/boost_1_73_0
|
||||||
|
|
||||||
# Install libprotobuf-mutator
|
# Install libprotobuf-mutator
|
||||||
RUN mkdir $SRC/LPM; \
|
RUN mkdir $SRC/LPM; \
|
||||||
|
@ -58,22 +60,4 @@ RUN cd $SRC/evmone; \
|
||||||
ninja; \
|
ninja; \
|
||||||
ninja install;
|
ninja install;
|
||||||
|
|
||||||
# Antlr4 Runtime
|
|
||||||
RUN set -ex; \
|
|
||||||
cd /usr/src; \
|
|
||||||
wget https://www.antlr.org/download/antlr4-cpp-runtime-4.8-source.zip; \
|
|
||||||
rm -rf antlr4-runtime && mkdir antlr4-runtime; \
|
|
||||||
unzip antlr4-cpp-runtime-4.8-source.zip -d antlr4-runtime; \
|
|
||||||
cd antlr4-runtime && mkdir build && cd build; \
|
|
||||||
cmake .. -DWITH_LIBCXX=On -DCMAKE_BUILD_TYPE=Release -DWITH_DEMO=False; \
|
|
||||||
make -j; \
|
|
||||||
DESTDIR=run make install; \
|
|
||||||
# Manually copy needed library and includes since install script
|
|
||||||
# does not respect -DCMAKE_INSTALL_DIR and there is no option
|
|
||||||
# to disable shared library build/installation
|
|
||||||
cp -Rf run/usr/local/include/antlr4-runtime /usr/include; \
|
|
||||||
cp -f run/usr/local/lib/libantlr4-runtime.a /usr/lib; \
|
|
||||||
rm -rf /usr/src/antlr4-cpp-runtime-4.8-source.zip; \
|
|
||||||
rm -rf /usr/src/antlr4-runtime
|
|
||||||
|
|
||||||
COPY build.sh $SRC/
|
COPY build.sh $SRC/
|
||||||
|
|
Loading…
Reference in New Issue