Skip to content

Commit

Permalink
Get -std=... from runConfigureICU instead of hardcoding it (google#11465
Browse files Browse the repository at this point in the history
)

ICU4C nowadays requires C11 & C++17 so it'd be better if the oss-fuzz
configuration didn't hardcode the standard versions required.
  • Loading branch information
roubert authored Jan 9, 2024
1 parent e81dea9 commit da06e1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions projects/icu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ export UBSAN_OPTIONS="detect_leaks=0"

make -j$(nproc)

$CXX $CXXFLAGS -std=c++11 -c $SRC/icu/icu4c/source/test/fuzzer/locale_util.cpp \
# Pick up additional flags (-std=...) added by runConfigureICU.
CXXFLAGS="$CXXFLAGS $(config/icu-config --noverify --cxxflags)"

$CXX $CXXFLAGS -c $SRC/icu/icu4c/source/test/fuzzer/locale_util.cpp \
-I$SRC/icu/icu4c/source/common \
-I$SRC/icu4c/source/test/fuzzer

Expand All @@ -44,7 +47,7 @@ FUZZERS=$FUZZER_PATH/*_fuzzer.cpp

for fuzzer in $FUZZERS; do
file=${fuzzer:${#FUZZER_PATH}+1}
$CXX $CXXFLAGS -std=c++11 \
$CXX $CXXFLAGS \
$fuzzer -o $OUT/${file/.cpp/} locale_util.o \
-I$SRC/icu/icu4c/source/common -I$SRC/icu/icu4c/source/i18n -L$WORK/icu/lib \
$LIB_FUZZING_ENGINE -licui18n -licuuc -licutu -licudata
Expand Down

0 comments on commit da06e1d

Please sign in to comment.