summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_config.h.cmake
diff options
context:
space:
mode:
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-11-07 15:58:36 +0000
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2016-11-07 15:58:36 +0000
commit50fed0475f13e0a5868e25cc29746ac3fa32efbd (patch)
tree6df2518e60b4060c7e67ebc529d9df3270f8e25d /openmp/runtime/src/kmp_config.h.cmake
parent1d50fe9befc215d37af3b0459035e1022de6abde (diff)
downloadbcm5719-llvm-50fed0475f13e0a5868e25cc29746ac3fa32efbd.tar.gz
bcm5719-llvm-50fed0475f13e0a5868e25cc29746ac3fa32efbd.zip
[OpenMP] Enable ThreadSanitizer to check OpenMP programs
This patch allows ThreadSanitizer (Tsan) to verify OpenMP programs. It means that no false positive will be reported by Tsan when verifying an OpenMP programs. This patch introduces annotations within the OpenMP runtime module to provide information about thread synchronization to the Tsan runtime. In order to enable the Tsan support when building the runtime, you must enable the TSAN_SUPPORT option with the following environment variable: -DLIBOMP_TSAN_SUPPORT=TRUE The annotations will be enabled in the main shared library (same mechanism of OMPT). Patch by Simone Atzeni and Joachim Protze! Differential Revision: https://reviews.llvm.org/D13072 llvm-svn: 286115
Diffstat (limited to 'openmp/runtime/src/kmp_config.h.cmake')
-rw-r--r--openmp/runtime/src/kmp_config.h.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_config.h.cmake b/openmp/runtime/src/kmp_config.h.cmake
index 8eb3e571c5b..03f8cfd9412 100644
--- a/openmp/runtime/src/kmp_config.h.cmake
+++ b/openmp/runtime/src/kmp_config.h.cmake
@@ -68,6 +68,10 @@
#define OMP_45_ENABLED (LIBOMP_OMP_VERSION >= 45)
#define OMP_40_ENABLED (LIBOMP_OMP_VERSION >= 40)
#define OMP_30_ENABLED (LIBOMP_OMP_VERSION >= 30)
+#cmakedefine01 LIBOMP_TSAN_SUPPORT
+#if LIBOMP_TSAN_SUPPORT
+#define TSAN_SUPPORT
+#endif
// Configured cache line based on architecture
#if KMP_ARCH_PPC64
OpenPOWER on IntegriCloud