aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects/harfbuzz/build.sh
diff options
context:
space:
mode:
authorGravatar Behdad Esfahbod <behdad@behdad.org>2018-10-25 17:24:24 -0700
committerGravatar Oliver Chang <oliverchang@users.noreply.github.com>2018-10-26 11:24:24 +1100
commit6d82dbf32cc68b7e6a4a6138514f0f31b57cd321 (patch)
tree78ef67362429b291cb87fe7535d8bf2463b6fc6b /projects/harfbuzz/build.sh
parenta4c654b5ee7b26a0a8b024480be85a7d2e19261e (diff)
Harfbuzz: a couple of improvements (#1908)
* [harfbuzz] Avoid zip duplicate-file-name errors Like this: https://oss-fuzz-build-logs.storage.googleapis.com/log-01068491-8fab-4886-8cc0-477fd26f3db1.txt Copy all font files into one directory (ignoring duplicates), then zip. * [harfbuzz] Remove -fno-sanitize=function Upstream is sanitize=function clean now.
Diffstat (limited to 'projects/harfbuzz/build.sh')
-rwxr-xr-xprojects/harfbuzz/build.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/projects/harfbuzz/build.sh b/projects/harfbuzz/build.sh
index d088cb44..a802037c 100755
--- a/projects/harfbuzz/build.sh
+++ b/projects/harfbuzz/build.sh
@@ -17,8 +17,8 @@
# Disable:
# 1. UBSan vptr since target built with -fno-rtti.
-export CFLAGS="$CFLAGS -fno-sanitize=function,vptr"
-export CXXFLAGS="$CXXFLAGS -fno-sanitize=function,vptr"
+export CFLAGS="$CFLAGS -fno-sanitize=vptr"
+export CXXFLAGS="$CXXFLAGS -fno-sanitize=vptr"
# Build the library.
./autogen.sh
@@ -37,5 +37,14 @@ $CXX $CXXFLAGS -std=c++11 -Isrc \
-lFuzzingEngine ./src/.libs/libharfbuzz-subset-fuzzing.a ./src/.libs/libharfbuzz-fuzzing.a
# Archive and copy to $OUT seed corpus if the build succeeded.
-zip -j -r $OUT/hb-shape-fuzzer_seed_corpus.zip $SRC/harfbuzz/test/shaping/data/in-house/fonts $SRC/harfbuzz/test/shaping/data/text-rendering-tests/fonts $SRC/harfbuzz/test/api/fonts $SRC/harfbuzz/test/fuzzing/fonts
+mkdir all-fonts
+for d in \
+ test/shaping/data/in-house/fonts \
+ test/shaping/data/text-rendering-tests/fonts \
+ test/api/fonts \
+ test/fuzzing/fonts \
+ ; do
+ cp $d/* all-fonts/
+done
+zip $OUT/hb-shape-fuzzer_seed_corpus.zip all-fonts/*
cp $OUT/hb-shape-fuzzer_seed_corpus.zip $OUT/hb-subset-fuzzer_seed_corpus.zip