Added Address Sanitizer as a cmake option. This will help us figure out the crash.

This commit is contained in:
Pietro Gagliardi 2017-02-16 13:00:57 -05:00
parent 685e17fc0e
commit 92b860c8f4
1 changed files with 12 additions and 0 deletions

View File

@ -118,6 +118,18 @@ else()
-static-libstdc++
)
endif()
# TODO document this
if(ADDRESS_SANITIZER)
set(_COMMON_CFLAGS ${_COMMON_CFLAGS}
-fsanitize=address
-fno-omit-frame-pointer
)
set(_COMMON_LDFLAGS ${_COMMON_LDFLAGS}
-fsanitize=address
-fno-omit-frame-pointer
)
endif()
endif()
# problem: