[CMake] Don't build libcxx_tsan with compilers other than Clang

llvm-svn: 209003
This commit is contained in:
Alexey Samsonov 2014-05-16 18:22:04 +00:00
parent 6ac2cd01d2
commit 36132035ca
2 changed files with 4 additions and 2 deletions

View File

@ -100,7 +100,8 @@ endif()
add_dependencies(compiler-rt tsan)
# Build libcxx instrumented with TSan.
if(COMPILER_RT_HAS_LIBCXX_SOURCES)
if(COMPILER_RT_HAS_LIBCXX_SOURCES AND
COMPILER_RT_TEST_COMPILER STREQUAL "Clang")
set(LIBCXX_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libcxx_tsan)
add_custom_libcxx(libcxx_tsan ${LIBCXX_PREFIX}
DEPS ${TSAN_RUNTIME_LIBRARIES}

View File

@ -2,7 +2,8 @@ set(TSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
if(NOT COMPILER_RT_STANDALONE_BUILD)
list(APPEND TSAN_TEST_DEPS tsan)
endif()
if(COMPILER_RT_HAS_LIBCXX_SOURCES)
if(COMPILER_RT_HAS_LIBCXX_SOURCES AND
COMPILER_RT_TEST_COMPILER STREQUAL "Clang")
list(APPEND TSAN_TEST_DEPS libcxx_tsan)
set(TSAN_HAS_LIBCXX True)
else()