summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/tsan/CMakeLists.txt3
-rw-r--r--compiler-rt/test/tsan/CMakeLists.txt3
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler-rt/lib/tsan/CMakeLists.txt b/compiler-rt/lib/tsan/CMakeLists.txt
index abb047649d2..3a71e9ac432 100644
--- a/compiler-rt/lib/tsan/CMakeLists.txt
+++ b/compiler-rt/lib/tsan/CMakeLists.txt
@@ -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}
diff --git a/compiler-rt/test/tsan/CMakeLists.txt b/compiler-rt/test/tsan/CMakeLists.txt
index e0c165d06cb..5b7be0c9678 100644
--- a/compiler-rt/test/tsan/CMakeLists.txt
+++ b/compiler-rt/test/tsan/CMakeLists.txt
@@ -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()
OpenPOWER on IntegriCloud