mirror of https://github.com/google/oss-fuzz.git
[libass] Build with HarfBuzz (#4562)
This fixes the build that got broken when libass made HarfBuzz a required dependency. This should also cover more libass code with the fuzzing.
This commit is contained in:
parent
3226bd66d2
commit
86eaa2b5d3
|
@ -15,9 +15,11 @@
|
|||
################################################################################
|
||||
|
||||
FROM gcr.io/oss-fuzz-base/base-builder
|
||||
RUN apt-get update && apt-get install -y make autoconf automake libtool pkg-config libfreetype6-dev libfontconfig1-dev
|
||||
RUN apt-get update && apt-get install -y make autoconf automake libtool pkg-config libfreetype6-dev libfontconfig1-dev python3-pip && \
|
||||
pip3 install meson==0.53.0 ninja
|
||||
|
||||
RUN git clone --depth 1 https://github.com/libass/libass.git
|
||||
RUN git clone --depth 1 https://github.com/behdad/fribidi.git
|
||||
RUN git clone --depth 1 https://github.com/harfbuzz/harfbuzz.git
|
||||
|
||||
COPY build.sh libass_fuzzer.cc *.dict *.options $SRC/
|
||||
|
|
|
@ -19,6 +19,24 @@ cd $SRC/fribidi
|
|||
./autogen.sh --disable-docs --enable-static=yes --enable-shared=no --with-pic=yes --prefix=/work/
|
||||
make install
|
||||
|
||||
cd $SRC/harfbuzz
|
||||
|
||||
# setup
|
||||
build=$WORK/build
|
||||
|
||||
# # cleanup
|
||||
rm -rf $build
|
||||
mkdir -p $build
|
||||
|
||||
# disable sanitize=vptr for harfbuzz since it compiles without rtti
|
||||
CFLAGS="$CFLAGS -fno-sanitize=vptr" \
|
||||
CXXFLAGS="$CXXFLAGS -fno-sanitize=vptr" \
|
||||
meson --default-library=static --wrap-mode=nodownload \
|
||||
-Dfuzzer_ldflags="$(echo $LIB_FUZZING_ENGINE)" \
|
||||
--prefix=/work/ --libdir=lib $build \
|
||||
|| (cat build/meson-logs/meson-log.txt && false)
|
||||
meson install -C $build
|
||||
|
||||
cd $SRC/libass
|
||||
|
||||
export PKG_CONFIG_PATH=/work/lib/pkgconfig
|
||||
|
@ -29,7 +47,7 @@ make -j$(nproc)
|
|||
$CXX $CXXFLAGS -std=c++11 -I$SRC/libass -L/work/lib \
|
||||
$SRC/libass_fuzzer.cc -o $OUT/libass_fuzzer \
|
||||
$LIB_FUZZING_ENGINE libass/.libs/libass.a \
|
||||
-Wl,-Bstatic -lfontconfig -lfribidi -lfreetype -lz -lpng12 \
|
||||
-Wl,-Bstatic -lfontconfig -lfribidi -lfreetype -lharfbuzz -lz -lpng12 \
|
||||
-lexpat -Wl,-Bdynamic
|
||||
|
||||
cp $SRC/*.dict $SRC/*.options $OUT/
|
||||
|
|
Loading…
Reference in New Issue