commit - 9d3d543aa768da31e2df9e39f1b480eb566349b5
commit + 159a4883faa8e0c52dd2b4a13e0ddb32a2c62f6f
blob - fd48534840fdd58df615c7d8beb2ca41de40ea53
blob + 17b89e7cb23f05c27dfc39461d3f4f9f158296b3
--- .clusterfuzzlite/build.sh
+++ .clusterfuzzlite/build.sh
cd $SRC/lua-c-api-tests
-# Avoid compilation issue due to some undefined references. They are defined in
-# libc++ and used by Centipede so -lc++ needs to come after centipede's lib.
-if [[ $FUZZING_ENGINE == centipede ]]
-then
- sed -i \
- '/$ENV{LIB_FUZZING_ENGINE}/a \ \ \ \ \ \ \ \ -lc++' \
- tests/capi/CMakeLists.txt
-fi
-
# For some reason the linker will complain if address sanitizer is not used
# in introspector builds.
if [ "$SANITIZER" == "introspector" ]; then
blob - cde0ca7f6f60cb8b303e8f56cc8da2ac981eae32
blob + d68c83b54488fd46889e3b876a11d8ba59bf156c
--- tests/capi/CMakeLists.txt
+++ tests/capi/CMakeLists.txt
${CXXFLAGS}
>
)
+
+# `-lc++` is required by Centipede.
+# Some references are defined in `libc++` and used by Centipede,
+# so -lc++ needs to come after centipede's lib.
target_link_libraries(
fuzzer_config
INTERFACE
>
$<$<BOOL:${OSS_FUZZ}>:
$ENV{LIB_FUZZING_ENGINE}
+ -lc++
>
)