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
commit547277436fa652c10fd0de28c6501745bc741c90 (patch)
tree3a72dc4645482534690a6b46dd712efbc4955181
parentf43f178f7aef50bca60de4cb9771995d12e0a081 (diff)
downloadscintilla-mirror-547277436fa652c10fd0de28c6501745bc741c90.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