aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-05-15 13:08:43 +1000
committerNeil <nyamatongwe@gmail.com>2014-05-15 13:08:43 +1000
commit0f51ecb02892fd34a514bf9e60a2f292d96a6787 (patch)
tree10986ae87ef6db43bbc8fc74722bcb02099fbd65
parenteae0e60bd7a0288f8aca6bb0f4afc863dffb3527 (diff)
downloadscintilla-mirror-0f51ecb02892fd34a514bf9e60a2f292d96a6787.tar.gz
Support Clang on Linux and turn on the address and undefined behaviour
sanitizers.
-rw-r--r--test/unit/makefile7
1 files changed, 6 insertions, 1 deletions
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