diff --git a/make/tools.mk b/make/tools.mk index 3aa9163c..393707f7 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -85,15 +85,20 @@ else ifeq ($(PLATFORM),BSD) endif ifeq ($(DEBUG),1) - CFLAGS_EXT += -Og -g3 -DLSP_DEBUG -fsanitize=address - CXXFLAGS_EXT += -Og -g3 -DLSP_DEBUG -fsanitize=address - EXE_FLAGS_EXT += -fsanitize=address - SO_FLAGS_EXT += -fsanitize=address + CFLAGS_EXT += -Og -g3 -DLSP_DEBUG + CXXFLAGS_EXT += -Og -g3 -DLSP_DEBUG else CFLAGS_EXT += -O2 CXXFLAGS_EXT += -O2 endif +ifeq ($(ASAN),1) + CFLAGS_EXT += -fsanitize=address + CXXFLAGS_EXT += -fsanitize=address + EXE_FLAGS_EXT += -fsanitize=address + SO_FLAGS_EXT += -fsanitize=address +endif + ifeq ($(PROFILE),1) CFLAGS_EXT += -pg -DLSP_PROFILE CXXFLAGS_EXT += -pg -DLSP_PROFILE