1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Asan: Fix utest bug.

This commit is contained in:
winlin 2022-11-23 16:43:52 +08:00
parent 13918ed81f
commit f10412d289
2 changed files with 49 additions and 47 deletions

View file

@ -75,7 +75,7 @@ AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/kernel SOURCE_FILES)
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/protocol SOURCE_FILES)
AUX_SOURCE_DIRECTORY(${SRS_DIR}/src/app SOURCE_FILES)
ADD_DEFINITIONS("-g -O0")
ADD_DEFINITIONS("-g -O0 -fsanitize=address -fno-omit-frame-pointer")
###########################################################
# Setup SRS project
@ -88,6 +88,7 @@ TARGET_LINK_LIBRARIES(srs dl)
TARGET_LINK_LIBRARIES(srs ${DEPS_LIBS})
TARGET_LINK_LIBRARIES(srs -ldl -pthread)
TARGET_LINK_LIBRARIES(srs -rdynamic)
TARGET_LINK_LIBRARIES(srs -fsanitize=address -fno-omit-frame-pointer)
###########################################################
# For utest.
@ -105,6 +106,7 @@ TARGET_LINK_LIBRARIES(utest gtest gtest_main)
TARGET_LINK_LIBRARIES(utest dl)
TARGET_LINK_LIBRARIES(utest ${DEPS_LIBS})
TARGET_LINK_LIBRARIES(utest -ldl -pthread)
TARGET_LINK_LIBRARIES(utest -fsanitize=address -fno-omit-frame-pointer)
###########################################################
# Done