]> sourceware.org Git - libabigail.git/commitdiff
Enable building with AddressSanitizer activated
authorDodji Seketeli <dodji@redhat.com>
Thu, 18 Apr 2019 09:01:47 +0000 (11:01 +0200)
committerDodji Seketeli <dodji@redhat.com>
Thu, 18 Apr 2019 09:01:47 +0000 (11:01 +0200)
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>
configure.ac

index 5537e6792903950c395517b9941eab57a8a75169..ea1f2446eb3203aeae6160fe300d284eb8c5a7da 100644 (file)
@@ -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
This page took 0.037294 seconds and 5 git commands to generate.