changeset 86:cc7fcaf139ef

Add ASAN build flag.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 21 May 2020 09:20:24 +0300
parents 2ce1f9f288c7
children 036e9d737ba9
files Makefile.gen
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.gen	Thu Apr 02 22:11:45 2020 +0300
+++ b/Makefile.gen	Thu May 21 09:20:24 2020 +0300
@@ -1,8 +1,15 @@
 ###
 ### Compiler flags
 ###
-CXXFLAGS += -O3 -W -Wall -std=c++11
+ifneq ($(ASAN),)
+CXXFLAGS += -fsanitize=address
+LDFLAGS += -lasan
+else
+CXXFLAGS += -O3
 LDFLAGS += 
+endif
+
+CXXFLAGS += -g -W -Wall -std=c++11
 CXXFLAGS += $(SDL_CFLAGS) $(GL_CFLAGS)