From: Dodji Seketeli Date: Thu, 18 Apr 2019 09:01:47 +0000 (+0200) Subject: Enable building with AddressSanitizer activated X-Git-Tag: libabigail-1.7~121 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=54488283938022ea4572d197fbcc8021a3fdaf8d;p=libabigail.git Enable building with AddressSanitizer activated 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 --- diff --git a/configure.ac b/configure.ac index 5537e679..ea1f2446 100644 --- a/configure.ac +++ b/configure.ac @@ -583,6 +583,10 @@ AC_SUBST(DEPS_LIBS) 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