From da06e1d4905fa1f4a4d7e8d061149824f691eaaf Mon Sep 17 00:00:00 2001 From: Fredrik Roubert Date: Wed, 10 Jan 2024 06:16:15 +0900 Subject: [PATCH] Get -std=... from runConfigureICU instead of hardcoding it (#11465) ICU4C nowadays requires C11 & C++17 so it'd be better if the oss-fuzz configuration didn't hardcode the standard versions required. --- projects/icu/build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/icu/build.sh b/projects/icu/build.sh index 1984ba627f73..58de13380883 100755 --- a/projects/icu/build.sh +++ b/projects/icu/build.sh @@ -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 @@ -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