summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8ca542b..f1a483b 100644
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,9 @@ LOCAL_LDFLAGS :=
LOCAL_LDLIBS :=
ASAN := $(filter asan,$(MAKECMDGOALS))
+LSAN := $(filter lsan,$(MAKECMDGOALS))
MSAN := $(filter msan,$(MAKECMDGOALS))
+TSAN := $(filter tsan,$(MAKECMDGOALS))
UBSAN := $(filter ubsan,$(MAKECMDGOALS))
ifndef MSAN
@@ -129,11 +131,21 @@ LOCAL_CFLAGS += -fsanitize=address
SANITIZE := y
endif
+ifdef LSAN
+LOCAL_CFLAGS += -fsanitize=leak
+SANITIZE := y
+endif
+
ifdef MSAN
LOCAL_CFLAGS += -fsanitize=memory -fsanitize-memory-track-origins
SANITIZE := y
endif
+ifdef TSAN
+LOCAL_CFLAGS += -fsanitize=thread
+SANITIZE := y
+endif
+
ifdef UBSAN
LOCAL_CFLAGS += -fsanitize=undefined
SANITIZE := y
@@ -164,7 +176,7 @@ $(shell ./flags.sh $(ALL_FLAGS))
BIN_GOALS := bfs tests/mksock tests/trie tests/xtimegm
# Goals that are treated like flags by this Makefile
-FLAG_GOALS := asan msan ubsan gcov release
+FLAG_GOALS := asan lsan msan tsan ubsan gcov release
# These are the remaining non-flag goals
GOALS := $(filter-out $(FLAG_GOALS),$(MAKECMDGOALS))