From 0f51ecb02892fd34a514bf9e60a2f292d96a6787 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 15 May 2014 13:08:43 +1000 Subject: Support Clang on Linux and turn on the address and undefined behaviour sanitizers. --- test/unit/makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/unit') diff --git a/test/unit/makefile b/test/unit/makefile index de3b09d1c..31e545dcd 100644 --- a/test/unit/makefile +++ b/test/unit/makefile @@ -9,15 +9,20 @@ ifndef windir ifeq ($(shell uname),Darwin) # On OS X always use clang as g++ is old version CLANG = 1 +USELIBCPP = 1 endif endif CXXFLAGS += --std=c++11 ifdef CLANG -CXX = clang +CXX = clang++ +SANITIZE = -fsanitize=address,undefined +CXXFLAGS += $(SANITIZE) +ifdef USELIBCPP CXXFLAGS += --stdlib=libc++ LINKFLAGS = -lc++ +endif else CXX = g++ endif -- cgit v1.2.3