Added ZT_SANITIZE option to makefiles. This your new memory debugging best friend

This commit is contained in:
Joseph Henry 2017-12-14 13:27:49 -08:00
parent 7a22f01dd8
commit 346fa4d7f4
3 changed files with 12 additions and 0 deletions

View file

@ -7,6 +7,10 @@ LIBS=
include objects.mk
ONE_OBJS+=osdep/BSDEthernetTap.o ext/http-parser/http_parser.o
# Build with address sanitization library for advanced debugging (clang)
ifeq ($(ZT_SANITIZE),1)
SANFLAGS+=-fsanitize=address -DASAN_OPTIONS=symbolize=1
endif
# "make debug" is a shortcut for this
ifeq ($(ZT_DEBUG),1)
CFLAGS+=-Wall -Werror -g -pthread $(INCLUDES) $(DEFS)