From 3b7db8ac31fb79bb1c34a60e259940d14b106a81 Mon Sep 17 00:00:00 2001 From: gnrunge <41129501+gnrunge@users.noreply.github.com> Date: Wed, 6 Feb 2019 10:22:53 -0800 Subject: [PATCH] Adds build instructions for recently added ICU fuzzer targets (#2139) * Update Dockerfile * Adds instructions to build recently added ICU fuzzer targets. --- projects/icu/build.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/projects/icu/build.sh b/projects/icu/build.sh index ee8b01f00..4f90cb000 100755 --- a/projects/icu/build.sh +++ b/projects/icu/build.sh @@ -33,19 +33,38 @@ export UBSAN_OPTIONS="detect_leaks=0" make -j$(nproc) +$CXX $CXXFLAGS -std=c++11 -c $SRC/icu/icu4c/source/test/fuzzer/locale_util.cc \ + -I$SRC/icu4c/source/test/fuzzer + FUZZERS="break_iterator_fuzzer \ break_iterator_utf32_fuzzer \ converter_fuzzer \ + locale_fuzzer \ number_format_fuzzer \ ucasemap_fuzzer \ + uloc_canonicalize_fuzzer \ + uloc_for_language_tag_fuzzer \ + uloc_get_name_fuzzer \ + uloc_is_right_to_left_fuzzer \ + uloc_open_keywords_fuzzer \ unicode_string_codepage_create_fuzzer \ uregex_open_fuzzer " for fuzzer in $FUZZERS; do $CXX $CXXFLAGS -std=c++11 \ - $SRC/icu/icu4c/source/test/fuzzer/$fuzzer.cc -o $OUT/$fuzzer \ + $SRC/icu/icu4c/source/test/fuzzer/$fuzzer.cc -o $OUT/$fuzzer locale_util.o \ -I$SRC/icu/icu4c/source/common -I$SRC/icu/icu4c/source/i18n -L$WORK/icu/lib \ -lFuzzingEngine -licui18n -licuuc -licutu -licudata done +CORPUS="uloc_canonicalize_fuzzer_seed_corpus \ + uloc_for_language_tag_fuzzer_seed_corpus \ + uloc_get_name_fuzzer_seed_corpus \ + uloc_is_right_to_left_fuzzer_seed_corpus \ + uloc_open_keywords_fuzzer_seed_corpus + " +for corpus in $CORPUS; do + zip $OUT/$corpus.zip $SRC/icu/icu4c/source/test/fuzzer/$corpus.txt +done + cp $SRC/icu/icu4c/source/test/fuzzer/*.dict $OUT/