From 107239c9275c2f410e5635555805a4c982b5469b Mon Sep 17 00:00:00 2001
From: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
Date: Tue, 12 May 2015 20:57:57 -0700
Subject: Add config=sanitize support to Makefile

---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'Makefile')

diff --git a/Makefile b/Makefile
index ead0ddd..0df07e6 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,11 @@ ifeq ($(config),coverage)
 	LDFLAGS+=-fprofile-arcs
 endif
 
+ifeq ($(config),sanitize)
+	CXXFLAGS+=-fsanitize=address -fsanitize=undefined -fno-sanitize=vptr
+	LDFLAGS+=-fsanitize=address -fsanitize=undefined
+endif
+
 ifneq ($(defines),standard)
 	COMMA=,
 	CXXFLAGS+=-D $(subst $(COMMA), -D ,$(defines))
-- 
cgit v1.2.3