From 346fa4d7f4506e9ddbf8dc8278210bc0c2b08251 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Thu, 14 Dec 2017 13:27:49 -0800 Subject: Added ZT_SANITIZE option to makefiles. This your new memory debugging best friend --- make-linux.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'make-linux.mk') diff --git a/make-linux.mk b/make-linux.mk index 5b623247..5e0f5b98 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -55,6 +55,10 @@ ifeq ($(ZT_RULES_ENGINE_DEBUGGING),1) override DEFS+=-DZT_RULES_ENGINE_DEBUGGING endif +# Build with address sanitization library for advanced debugging (clang) +ifeq ($(ZT_SANITIZE),1) + SANFLAGS+=-fsanitize=address -DASAN_OPTIONS=symbolize=1 +endif ifeq ($(ZT_DEBUG),1) override CFLAGS+=-Wall -Wno-deprecated -Werror -g -pthread $(INCLUDES) $(DEFS) override CXXFLAGS+=-Wall -Wno-deprecated -Werror -g -std=c++11 -pthread $(INCLUDES) $(DEFS) -- cgit v1.2.3