Skip to content

Commit

Permalink
[tarantool] Append -lc++ after $LIB_FUZZING_ENGINE (#9060)
Browse files Browse the repository at this point in the history
Add a line to `CMakeLists.txt` to ensure `-lc++` is added after
`$LIB_FUZZING_ENGINE`.
  • Loading branch information
DonggeLiu authored Nov 24, 2022
1 parent 3ef8c6c commit 92d4e95
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions projects/tarantool/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ;;
Expand Down

0 comments on commit 92d4e95

Please sign in to comment.