Add feature to build with ASAN (--enable-gcc-asan)
This commit is contained in:
parent
33a0c3e595
commit
01a2163989
|
@ -458,6 +458,8 @@ else
|
|||
EC_C_WARNINGS()
|
||||
fi
|
||||
|
||||
EC_C_ASAN()
|
||||
|
||||
AC_DEFINE(USE_EXT_INIT_WIN, 1, [Use external init window during restart])
|
||||
|
||||
AC_DEFINE(ENABLE_DESKRAY, 0, [Enable deskrays (not functional)])
|
||||
|
|
|
@ -9,5 +9,7 @@ edox_SOURCES = dox.c dox.h file.c format.c text.c ttfont.c
|
|||
edox_CPPFLAGS = -I$(top_builddir) $(IMLIB2_CFLAGS) $(X_CFLAGS) \
|
||||
$(CFLAGS_WARNINGS) -D ENLIGHTENMENT_ROOT=\"$(pkgdatadir)\"
|
||||
|
||||
edox_CFLAGS = $(CFLAGS_ASAN)
|
||||
|
||||
LDADD = $(IMLIB2_LIBS) $(X_LIBS) $(XINERAMA_LIBS) -lX11 -lm
|
||||
|
||||
|
|
|
@ -5,5 +5,7 @@ eesh_SOURCES = E.h comms.c main.c
|
|||
|
||||
eesh_CPPFLAGS = -I$(top_builddir) $(X_CFLAGS) $(CFLAGS_WARNINGS)
|
||||
|
||||
eesh_CFLAGS = $(CFLAGS_ASAN)
|
||||
|
||||
LDADD = $(X_LIBS) -lX11
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ libe16_LTLIBRARIES = $(LIB_HACK) $(LIB_TRIP)
|
|||
AM_CPPFLAGS = -I$(top_srcdir)/src $(X_CFLAGS) \
|
||||
$(CFLAGS_WARNINGS) $(CFLAGS_VISIBILITY)
|
||||
|
||||
AM_CFLAGS = $(CFLAGS_ASAN)
|
||||
|
||||
if BUILD_LIBHACK
|
||||
|
||||
LIB_HACK = libhack.la
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
dnl Copyright (C) 2020 Kim Woelders
|
||||
dnl This code is public domain and can be freely used or copied.
|
||||
|
||||
dnl Macro to set compiler flags in CFLAGS_ASAN
|
||||
|
||||
dnl Usage: EC_C_ASAN()
|
||||
|
||||
AC_DEFUN([EC_C_ASAN], [
|
||||
AC_ARG_ENABLE(gcc-asan,
|
||||
[AS_HELP_STRING([--enable-gcc-asan],
|
||||
[compile with ASAN support @<:@default=no@:>@])],,
|
||||
enable_gcc_asan=no)
|
||||
|
||||
if test "x$GCC" = "xyes"; then
|
||||
if test "x$enable_gcc_asan" = "xyes"; then
|
||||
CFLAGS_ASAN="-fsanitize=address -fno-omit-frame-pointer"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CFLAGS_ASAN)
|
||||
])
|
|
@ -119,6 +119,9 @@ e16_SOURCES = \
|
|||
$(SRCS_DBUS) \
|
||||
$(SRCS_SNPRINTF)
|
||||
|
||||
AM_CFLAGS = \
|
||||
$(CFLAGS_ASAN)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(CFLAGS_WARNINGS) \
|
||||
$(CFLAGS_VISIBILITY) \
|
||||
|
|
Loading…
Reference in New Issue