diff options
| author | Joseph Henry <[email protected]> | 2017-12-14 13:27:49 -0800 |
|---|---|---|
| committer | Joseph Henry <[email protected]> | 2017-12-14 13:27:49 -0800 |
| commit | 346fa4d7f4506e9ddbf8dc8278210bc0c2b08251 (patch) | |
| tree | c61f755f03005252b75233cd43565dc866e422c7 /make-bsd.mk | |
| parent | 7a22f01dd8ec5801ccd48cda832f009245601040 (diff) | |
Added ZT_SANITIZE option to makefiles. This your new memory debugging best friend
Diffstat (limited to 'make-bsd.mk')
| -rw-r--r-- | make-bsd.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/make-bsd.mk b/make-bsd.mk index c3f2f3a1..713cafc0 100644 --- a/make-bsd.mk +++ b/make-bsd.mk @@ -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) |
