From 9e33d2f3c55a0ca671a80b8b4ab075f6be6a8d9a Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Thu, 20 Jan 2022 00:21:33 +0000 Subject: [PATCH] firestore: fix build (#7161) --- projects/firestore/build.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/projects/firestore/build.sh b/projects/firestore/build.sh index 7ada1b9d6..53926f54c 100755 --- a/projects/firestore/build.sh +++ b/projects/firestore/build.sh @@ -25,8 +25,20 @@ export CXXFLAGS="$CXXFLAGS -fno-sanitize=vptr" # Build the project using cmake with FUZZING option enabled to link to OSS Fuzz # fuzzing library defined in ${LIB_FUZZING_ENGINE}. cd $SRC/firebase-ios-sdk + +# Do not use Werror anywhere +sed -i 's/-Werror=reorder//g' ./cmake/compiler_setup.cmake +sed -i 's/-Werror=return-type//g' ./cmake/compiler_setup.cmake +sed -i 's/-Wall -Wextra -Werror//g' ./cmake/compiler_setup.cmake +sed -i 's/-Wuninitialized/#-Wu/g' ./cmake/compiler_setup.cmake +sed -i 's/-Wfno-common/#-Wu/g' ./cmake/compiler_setup.cmake +sed -i 's/-Werror//g' ./scripts/sync_project.rb +sed -i 's/-Werror=reorder//g' ./FirebaseFirestore.podspec +sed -i 's/ReadContext context/\/\/ReadContext/g' ./Firestore/fuzzing/serializer_fuzzer.cc +sed -i 's/serializer.Dec/\/\/serializer/g' ./Firestore/fuzzing/serializer_fuzzer.cc + mkdir build && cd build -cmake -DFUZZING=ON .. +cmake -DFIREBASE_IOS_BUILD_TESTS=OFF -DFIREBASE_IOS_BUILD_BENCHMARKS=OFF -DFUZZING=ON .. make -j$(nproc) # Copy fuzzing targets, dictionaries, and zipped corpora to $OUT.