aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-02-13 14:59:55 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-02-13 14:59:55 +0000
commit48f79c11890f23f47fbe89ec54a57d5cd485a7b1 (patch)
treeb7c351213a811b3dcdba82d1b58caaade64d5ca0 /lib
parent807551b099338b7cc4f66ee567aae20a529dd27e (diff)
downloadsrc-48f79c11890f23f47fbe89ec54a57d5cd485a7b1.tar.gz
src-48f79c11890f23f47fbe89ec54a57d5cd485a7b1.zip
Vendor import of compiler-rt release_38 branch r260756:vendor/compiler-rt/compiler-rt-release_38-r260756
Notes
Notes: svn path=/vendor/compiler-rt/dist/; revision=295594 svn path=/vendor/compiler-rt/compiler-rt-release_38-r260756/; revision=295595; tag=vendor/compiler-rt/compiler-rt-release_38-r260756
Diffstat (limited to 'lib')
-rw-r--r--lib/tsan/CMakeLists.txt15
-rw-r--r--lib/tsan/rtl/tsan_suppressions.cc4
2 files changed, 13 insertions, 6 deletions
diff --git a/lib/tsan/CMakeLists.txt b/lib/tsan/CMakeLists.txt
index 0e60cd3464d8..c185cfa16407 100644
--- a/lib/tsan/CMakeLists.txt
+++ b/lib/tsan/CMakeLists.txt
@@ -204,10 +204,17 @@ endif()
# Build libcxx instrumented with TSan.
if(COMPILER_RT_HAS_LIBCXX_SOURCES AND
COMPILER_RT_TEST_COMPILER_ID STREQUAL "Clang")
- set(LIBCXX_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libcxx_tsan)
- add_custom_libcxx(libcxx_tsan ${LIBCXX_PREFIX}
- DEPS ${TSAN_RUNTIME_LIBRARIES}
- CFLAGS -fsanitize=thread)
+ set(libcxx_tsan_deps)
+ foreach(arch ${TSAN_SUPPORTED_ARCH})
+ get_target_flags_for_arch(${arch} TARGET_CFLAGS)
+ set(LIBCXX_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libcxx_tsan_${arch})
+ add_custom_libcxx(libcxx_tsan_${arch} ${LIBCXX_PREFIX}
+ DEPS ${TSAN_RUNTIME_LIBRARIES}
+ CFLAGS ${TARGET_CFLAGS} -fsanitize=thread)
+ list(APPEND libcxx_tsan_deps libcxx_tsan_${arch})
+ endforeach()
+
+ add_custom_target(libcxx_tsan DEPENDS ${libcxx_tsan_deps})
endif()
if(COMPILER_RT_INCLUDE_TESTS)
diff --git a/lib/tsan/rtl/tsan_suppressions.cc b/lib/tsan/rtl/tsan_suppressions.cc
index 8754b61c60cd..b992d78f8cb5 100644
--- a/lib/tsan/rtl/tsan_suppressions.cc
+++ b/lib/tsan/rtl/tsan_suppressions.cc
@@ -159,8 +159,8 @@ void PrintMatchedSuppressions() {
Printf("ThreadSanitizer: Matched %d suppressions (pid=%d):\n", hit_count,
(int)internal_getpid());
for (uptr i = 0; i < matched.size(); i++) {
- Printf("%d %s:%s\n", matched[i]->hit_count, matched[i]->type,
- matched[i]->templ);
+ Printf("%d %s:%s\n", atomic_load_relaxed(&matched[i]->hit_count),
+ matched[i]->type, matched[i]->templ);
}
}
} // namespace __tsan