[libcxx] r222259 - Add support for LLVM_USE_SANITIZER=Thread
Eric Fiselier
eric at efcs.ca
Tue Nov 18 13:26:46 PST 2014
Author: ericwf
Date: Tue Nov 18 15:26:45 2014
New Revision: 222259
URL: http://llvm.org/viewvc/llvm-project?rev=222259&view=rev
Log:
Add support for LLVM_USE_SANITIZER=Thread
Modified:
libcxx/trunk/CMakeLists.txt
libcxx/trunk/test/lit.cfg
Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=222259&r1=222258&r2=222259&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Tue Nov 18 15:26:45 2014
@@ -229,6 +229,8 @@ if (LIBCXX_BUILT_STANDALONE)
elseif (LLVM_USE_SANITIZER STREQUAL "Undefined")
list(APPEND LIBCXX_CXX_FLAGS
"-fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover")
+ elseif (LLVM_USE_SANITIZER STREQUAL "Thread")
+ list(APPEND LIBCXX_CXX_FLAGS "-fsanitize=thread")
else()
message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
endif()
Modified: libcxx/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.cfg?rev=222259&r1=222258&r2=222259&view=diff
==============================================================================
--- libcxx/trunk/test/lit.cfg (original)
+++ libcxx/trunk/test/lit.cfg Tue Nov 18 15:26:45 2014
@@ -455,6 +455,9 @@ class Configuration(object):
'-fno-sanitize=vptr,function',
'-fno-sanitize-recover', '-O3']
self.config.available_features.add('ubsan')
+ elif san == 'Thread':
+ self.compile_flags += ['-fsanitize=thread']
+ self.config.available_features.add('tsan')
else:
self.lit_config.fatal('unsupported value for '
'libcxx_use_san: {0}'.format(san))
More information about the cfe-commits
mailing list