From 92d4e951c3a10b8b3d67ccd061ddaba71f01a328 Mon Sep 17 00:00:00 2001 From: Dongge Liu Date: Fri, 25 Nov 2022 10:31:33 +1100 Subject: [PATCH] [tarantool] Append -lc++ after $LIB_FUZZING_ENGINE (#9060) Add a line to `CMakeLists.txt` to ensure `-lc++` is added after `$LIB_FUZZING_ENGINE`. --- projects/tarantool/build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/tarantool/build.sh b/projects/tarantool/build.sh index 4e4d2072395c..2bef992381b8 100755 --- a/projects/tarantool/build.sh +++ b/projects/tarantool/build.sh @@ -39,6 +39,14 @@ cd $SRC/tarantool # not unused, but the compilers are complaining. sed -i 's/total = 0;/total = 0;(void)total;/g' ./src/lib/core/crash.c sed -i 's/n = 0;/n = 0;(void)n;/g' ./src/lib/core/sio.c +# 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++' \ + test/fuzz/CMakeLists.txt +fi case $SANITIZER in address) SANITIZERS_ARGS="-DENABLE_ASAN=ON" ;;