1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 08:20:44 +00:00

Fuzzers: Use libc++ on OSS-Fuzz for Lagom code generators

By unsetting `CXXFLAGS` in order to build Lagom code generators without
instrumentation, we were also removing `-stdlib=libc++`, so Clang ended
up using the runner image's libstdc++ 9 headers. These are too old, and
don't contain `<coroutine>`, leading to a build failure.

Fixes #24578
This commit is contained in:
Daniel Bertalan 2024-06-22 18:07:32 +02:00
parent a711bb63b7
commit 8b189b7eb0

View File

@ -47,7 +47,10 @@ unset CXXFLAGS
export AFL_NOOPT=1
if [ "$#" -gt "0" ] && [ "--oss-fuzz" = "$1" ] ; then
CXXFLAGS="$CXXFLAGS -DOSS_FUZZ=ON"
# The oss-fuzz runner image (as of June 2024) has libstdc++ 9, which lacks the
# <coroutine> header. Use the more modern libc++ shipped with oss-fuzz's Clang.
# It's already set in CXXFLAGS_SAVE.
CXXFLAGS="$CXXFLAGS -DOSS_FUZZ=ON -stdlib=libc++"
fi
# FIXME: Replace these CMake invocations with a CMake superbuild?