mirror of https://github.com/google/oss-fuzz.git
[msgpack-c] fix build (#4157)
* msgpack-c is now header only, update to install boost as req as well
This commit is contained in:
parent
b4bf783905
commit
077c2b5aed
|
@ -15,7 +15,14 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
FROM gcr.io/oss-fuzz-base/base-builder
|
FROM gcr.io/oss-fuzz-base/base-builder
|
||||||
RUN apt-get update && apt-get install -y cmake
|
RUN apt-get update && apt-get install -y cmake wget bzip2
|
||||||
RUN git clone --depth 1 https://github.com/msgpack/msgpack-c.git msgpack-c
|
RUN git clone --depth 1 --single-branch --branch cpp_master https://github.com/msgpack/msgpack-c.git msgpack-c
|
||||||
|
|
||||||
|
RUN wget https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.bz2 && \
|
||||||
|
tar xf boost_1_70_0.tar.bz2 && \
|
||||||
|
cd boost_1_70_0 && \
|
||||||
|
./bootstrap.sh --with-toolset=clang --prefix=/usr && \
|
||||||
|
./b2 -j$(nproc) toolset=clang --with-chrono --with-context --with-filesystem --with-system --with-timer address-model=64 cflags="$CFLAGS" cxxflags="$CXXFLAGS" link=static variant=release runtime-link=static threading=multi install
|
||||||
|
|
||||||
WORKDIR msgpack-c
|
WORKDIR msgpack-c
|
||||||
COPY build.sh $SRC/
|
COPY build.sh $SRC/
|
||||||
|
|
|
@ -15,11 +15,6 @@
|
||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
cmake -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" \
|
|
||||||
-DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
|
|
||||||
-DMSGPACK_CXX11=ON .
|
|
||||||
make -j$(nproc) all
|
|
||||||
|
|
||||||
for f in $SRC/msgpack-c/fuzz/*_fuzzer.cpp; do
|
for f in $SRC/msgpack-c/fuzz/*_fuzzer.cpp; do
|
||||||
# NOTE(derwolfe): the naming scheme for fuzzers and seed corpora is
|
# NOTE(derwolfe): the naming scheme for fuzzers and seed corpora is
|
||||||
# fuzzer = something_something_fuzzer.cpp
|
# fuzzer = something_something_fuzzer.cpp
|
||||||
|
@ -27,7 +22,7 @@ for f in $SRC/msgpack-c/fuzz/*_fuzzer.cpp; do
|
||||||
fuzzer=$(basename "$f" .cpp)
|
fuzzer=$(basename "$f" .cpp)
|
||||||
$CXX $CXXFLAGS -std=c++11 -Iinclude -I"$SRC/msgpack-c/include" \
|
$CXX $CXXFLAGS -std=c++11 -Iinclude -I"$SRC/msgpack-c/include" \
|
||||||
"$f" -o "$OUT/${fuzzer}" \
|
"$f" -o "$OUT/${fuzzer}" \
|
||||||
$LIB_FUZZING_ENGINE "$SRC/msgpack-c/libmsgpackc.a"
|
$LIB_FUZZING_ENGINE
|
||||||
|
|
||||||
if [ -d "$SRC/msgpack-c/fuzz/${fuzzer}_seed_corpus" ]; then
|
if [ -d "$SRC/msgpack-c/fuzz/${fuzzer}_seed_corpus" ]; then
|
||||||
zip -rj "$OUT/${fuzzer}_seed_corpus.zip" "$SRC/msgpack-c/fuzz/${fuzzer}_seed_corpus/"
|
zip -rj "$OUT/${fuzzer}_seed_corpus.zip" "$SRC/msgpack-c/fuzz/${fuzzer}_seed_corpus/"
|
||||||
|
|
Loading…
Reference in New Issue