With this patch, configuring the project with the environment variables
ABIGAIL_DEVEL=on and ABIGAIL_DEVEL_ASAN=on will turn on
AddressSanitizer.
* configure.ac: If ABIGAIL_DEVEL_ASAN=on (in addition to
ABIGAIL_DEVEL=on), then turn on AddressSanitizer in the build.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
if test x$ABIGAIL_DEVEL != x; then
CFLAGS="-g -Wall -Wextra -Werror"
CXXFLAGS="-g -Wall -Wextra -Werror"
+ if test x$ABIGAIL_DEVEL_ASAN != x; then
+ CFLAGS="$CFLAGS -fsanitize=address"
+ CXXFLAGS="$CXXFLAGS -fsanitize=address"
+ fi
fi
dnl Check if several decls and constant are defined in dependant