Add ASan support

This commit is contained in:
EKR 2014-01-09 10:25:15 -08:00
parent 6b8fc49077
commit e1772654b5

View File

@ -5,6 +5,7 @@ CP=cp
ROOTDIR=$(PWD) ROOTDIR=$(PWD)
ifeq (,$(wildcard ./gtest)) ifeq (,$(wildcard ./gtest))
HAVE_GTEST=No HAVE_GTEST=No
else else
@ -20,6 +21,11 @@ CFLAGS = -g
USE_ASM = No USE_ASM = No
endif endif
ifeq ($(USE_ASAN), Yes)
CFLAGS += -fsanitize=address
LDFLAGS += -fsanitize=address
endif
ifeq ($(ENABLE64BIT), Yes) ifeq ($(ENABLE64BIT), Yes)
CFLAGS += -m64 CFLAGS += -m64
LDFLAGS += -m64 LDFLAGS += -m64