Skip to content
Snippets Groups Projects
Commit 9b681f61 authored by Eric Fiselier's avatar Eric Fiselier
Browse files

Add support for LLVM_USE_SANITIZER=Thread

llvm-svn: 222259
parent be6705d4
No related merge requests found
......@@ -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()
......
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment