summaryrefslogtreecommitdiff
path: root/make-mac.mk
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2017-12-14 13:27:49 -0800
committerJoseph Henry <josephjah@gmail.com>2017-12-14 13:27:49 -0800
commit346fa4d7f4506e9ddbf8dc8278210bc0c2b08251 (patch)
treec61f755f03005252b75233cd43565dc866e422c7 /make-mac.mk
parent7a22f01dd8ec5801ccd48cda832f009245601040 (diff)
downloadinfinitytier-346fa4d7f4506e9ddbf8dc8278210bc0c2b08251.tar.gz
infinitytier-346fa4d7f4506e9ddbf8dc8278210bc0c2b08251.zip
Added ZT_SANITIZE option to makefiles. This your new memory debugging best friend
Diffstat (limited to 'make-mac.mk')
-rw-r--r--make-mac.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/make-mac.mk b/make-mac.mk
index 4184792f..81159795 100644
--- a/make-mac.mk
+++ b/make-mac.mk
@@ -41,6 +41,10 @@ CORE_OBJS+=ext/x64-salsa2012-asm/salsa2012.o
DEFS+=-DMACOSX -DZT_USE_MINIUPNPC -DMINIUPNP_STATICLIB -D_DARWIN_C_SOURCE -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR -D_BSD_SOURCE -D_DEFAULT_SOURCE -DOS_STRING=\"Darwin/15.0.0\" -DMINIUPNPC_VERSION_STRING=\"2.0\" -DUPNP_VERSION_STRING=\"UPnP/1.1\" -DENABLE_STRNATPMPERR
ONE_OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o ext/miniupnpc/connecthostport.o ext/miniupnpc/igd_desc_parse.o ext/miniupnpc/minisoap.o ext/miniupnpc/minissdpc.o ext/miniupnpc/miniupnpc.o ext/miniupnpc/miniwget.o ext/miniupnpc/minixml.o ext/miniupnpc/portlistingparse.o ext/miniupnpc/receivedata.o ext/miniupnpc/upnpcommands.o ext/miniupnpc/upnpdev.o ext/miniupnpc/upnperrors.o ext/miniupnpc/upnpreplyparse.o osdep/PortMapper.o
+# Build with address sanitization library for advanced debugging (clang)
+ifeq ($(ZT_SANITIZE),1)
+ SANFLAGS+=-fsanitize=address -DASAN_OPTIONS=symbolize=1
+endif
# Debug mode -- dump trace output, build binary with -g
ifeq ($(ZT_DEBUG),1)
ZT_TRACE=1