build: link to asan/ubsan for sanitizer

This commit is contained in:
Danny Robson 2015-01-08 15:19:00 +11:00
parent 7c55029040
commit f37654d2bb

View File

@ -161,9 +161,13 @@ AS_IF([test "x$enable_debugging" = "xyes"], [
AX_APPEND_COMPILE_FLAGS([-fsanitize=address], [], [-Werror]) AX_APPEND_COMPILE_FLAGS([-fsanitize=address], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-fsanitize=undefined], [], [-Werror]) AX_APPEND_COMPILE_FLAGS([-fsanitize=undefined], [], [-Werror])
AX_APPEND_COMPILE_FLAGS([-fsanitize=leak], [], [-Werror]) AX_APPEND_COMPILE_FLAGS([-fsanitize=leak], [], [-Werror])
AX_APPEND_LINK_FLAGS([-fsanitize=address], [], [-Werror]) AX_APPEND_LINK_FLAGS([-fsanitize=address], [], [-Werror])
AX_APPEND_LINK_FLAGS([-fsanitize=undefined], [], [-Werror]) AX_APPEND_LINK_FLAGS([-fsanitize=undefined], [], [-Werror])
AX_APPEND_LINK_FLAGS([-fsanitize=leak], [], [-Werror]) AX_APPEND_LINK_FLAGS([-fsanitize=leak], [], [-Werror])
AX_APPEND_LINK_FLAGS([-lasan], [], [-Werror])
AX_APPEND_LINK_FLAGS([-lubsan], [], [-Werror])
]) ])
AX_APPEND_COMPILE_FLAGS([-ggdb], [], [-Werror]) AX_APPEND_COMPILE_FLAGS([-ggdb], [], [-Werror])