diff --git a/openmp/cmake/OpenMPTesting.cmake b/openmp/cmake/OpenMPTesting.cmake index c67ad8b1cbd9..14cc5c67d84c 100644 --- a/openmp/cmake/OpenMPTesting.cmake +++ b/openmp/cmake/OpenMPTesting.cmake @@ -163,6 +163,9 @@ else() set(OPENMP_TEST_COMPILER_HAS_OMIT_FRAME_POINTER_FLAGS 1) endif() +set(OPENMP_TEST_ENABLE_TSAN "${OPENMP_TEST_COMPILER_HAS_TSAN_FLAGS}" CACHE BOOL + "Whether to enable tests using tsan") + # Function to set compiler features for use in lit. function(update_test_compiler_features) set(FEATURES "[") diff --git a/openmp/tools/archer/tests/CMakeLists.txt b/openmp/tools/archer/tests/CMakeLists.txt index 5de91148fa4b..412c7d63725e 100644 --- a/openmp/tools/archer/tests/CMakeLists.txt +++ b/openmp/tools/archer/tests/CMakeLists.txt @@ -28,7 +28,7 @@ macro(pythonize_bool var) endmacro() pythonize_bool(LIBARCHER_HAVE_LIBATOMIC) -pythonize_bool(OPENMP_TEST_COMPILER_HAS_TSAN_FLAGS) +pythonize_bool(OPENMP_TEST_ENABLE_TSAN) set(ARCHER_TSAN_TEST_DEPENDENCE "") if(TARGET tsan) diff --git a/openmp/tools/archer/tests/lit.site.cfg.in b/openmp/tools/archer/tests/lit.site.cfg.in index 55edfde9738e..ddcb7b8bc3a5 100644 --- a/openmp/tools/archer/tests/lit.site.cfg.in +++ b/openmp/tools/archer/tests/lit.site.cfg.in @@ -12,7 +12,7 @@ config.omp_library_dir = "@LIBOMP_LIBRARY_DIR@" config.omp_header_dir = "@LIBOMP_INCLUDE_DIR@" config.operating_system = "@CMAKE_SYSTEM_NAME@" config.has_libatomic = @LIBARCHER_HAVE_LIBATOMIC@ -config.has_tsan = @OPENMP_TEST_COMPILER_HAS_TSAN_FLAGS@ +config.has_tsan = @OPENMP_TEST_ENABLE_TSAN@ config.test_archer_flags = "@LIBARCHER_TEST_FLAGS@" config.libarcher_obj_root = "@CMAKE_CURRENT_BINARY_DIR@"