Index: Makefile.standalone |
diff --git a/Makefile.standalone b/Makefile.standalone |
index 44a322e5a89a12863b10d6c905c188fe85eb2852..be60dc686993b2158d81e48e1e32ba4df8a65312 100644 |
--- a/Makefile.standalone |
+++ b/Makefile.standalone |
@@ -47,6 +47,8 @@ endif |
# The list of CXX defines that are dependent on build parameters. |
CXX_DEFINES = |
+CXX_EXTRA = |
+LD_EXTRA = |
ifdef MINIMAL |
NOASSERT = 1 |
@@ -65,6 +67,12 @@ else |
OBJDIR := $(OBJDIR)+Asserts |
endif |
+ifdef TSAN |
+ OBJDIR := $(OBJDIR)+TSan |
+ CXX_EXTRA += -fsanitize=thread |
+ LD_EXTRA += -fsanitize=thread |
+endif |
+ |
$(info -----------------------------------------------) |
$(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) |
$(info Using LLVM_BIN_PATH = $(LLVM_BIN_PATH)) |
@@ -85,8 +93,9 @@ CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++ |
CXXFLAGS := $(LLVM_CXXFLAGS) -std=c++11 -Wall -Wextra -Werror -fno-rtti \ |
-fno-exceptions $(OPTLEVEL) $(ASSERTIONS) $(CXX_DEFINES) -g \ |
$(HOST_FLAGS) -Wno-error=unused-parameter \ |
- -I$(LIBCXX_INSTALL_PATH)/include/c++/v1 |
-LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections |
+ -I$(LIBCXX_INSTALL_PATH)/include/c++/v1 $(CXX_EXTRA) |
+LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ |
+ $(LD_EXTRA) |
SRCS = \ |
assembler.cpp \ |