add address sanitizer support

This commit is contained in:
radius 2018-02-02 22:12:23 -05:00
parent 5660b762c0
commit 39c352c89b

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)