pluginprocess: try fixing asan on clang
@@ -120,11 +120,13 @@ endif ()
#
if (ENABLE_ASAN)
set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer")
- set (ASAN_LIBRARY "-lasan") # this is needed for GIR to put asan in front
+ set (ASAN_LIBRARY "-lubsan") # this is needed for GIR to put asan in front
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=integer")
set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize-blacklist=\"${CMAKE_SOURCE_DIR}/tests/sanitizer.blacklist\"")
+ # on some systems clang does not link the asan/ubsan libraries, so enforce it
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lubsan")
endif ()
if (CMAKE_COMPILER_IS_GNUCXX)
