Add address sanitizer option
This commit is contained in:
parent
ca2493f811
commit
7849001750
@ -37,6 +37,10 @@ AC_ARG_ENABLE([mudflap],
|
|||||||
[AS_HELP_STRING([--enable-mudflap], [enable mudflap runtime debugging])]
|
[AS_HELP_STRING([--enable-mudflap], [enable mudflap runtime debugging])]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([sanitizer], [
|
||||||
|
AS_HELP_STRING([--enable-sanitizer], [enable memory sanitizer])
|
||||||
|
])
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
## Warnings
|
## Warnings
|
||||||
|
|
||||||
@ -134,6 +138,11 @@ AS_IF([test "x$enable_debugging" = "xyes"], [
|
|||||||
AX_APPEND_LINK_FLAGS([-lmudflapth])
|
AX_APPEND_LINK_FLAGS([-lmudflapth])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AS_IF([test "x$enable_sanitizer" = "xyes"], [
|
||||||
|
AX_APPEND_COMPILE_FLAGS([-fsanitize=address])
|
||||||
|
AX_APPEND_LINK_FLAGS([-fsanitize=address])
|
||||||
|
])
|
||||||
|
|
||||||
AX_APPEND_COMPILE_FLAGS([-ggdb])
|
AX_APPEND_COMPILE_FLAGS([-ggdb])
|
||||||
|
|
||||||
AC_DEFINE([ENABLE_DEBUGGING], [], [Debugging support enabled])
|
AC_DEFINE([ENABLE_DEBUGGING], [], [Debugging support enabled])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user