add address sanitizer support

This commit is contained in:
radius 2018-02-02 22:12:23 -05:00
parent 5660b762c0
commit 39c352c89b
1 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,12 @@ else
endif
endif
ifneq ($(SANITIZER),)
CFLAGS := -fsanitize=$(SANITIZER) $(CFLAGS)
CXXFLAGS := -fsanitize=$(SANITIZER) $(CXXFLAGS)
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS) -lasan
endif
ifeq ($(platform), osx)
ifndef ($(NOUNIVERSAL))
CFLAGS += $(ARCHFLAGS)