File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,10 +152,17 @@ endif()
152152
153153# Build relacy tests by default only for GNU compiler and if tests are enabled
154154# It will take work to get other platforms to work in the future.
155- if (${STDEXEC_BUILD_TESTS} AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" )
156- set (STDEXEC_BUILD_RELACY_TESTS_DEFAULT ON )
155+ # Additionally, do not build the Relacy tests when a sanitizer is active. TSAN
156+ # doesn't do anything since Relacy simulates threads with fibers anyway. Relacy
157+ # has primtive (compared to ASAN) use-after-free detection which doesn't compose
158+ # with ASAN.
159+ if (
160+ ${STDEXEC_BUILD_TESTS} AND
161+ CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
162+ NOT CMAKE_CXX_FLAGS MATCHES "-fsanitize" )
163+ set (STDEXEC_BUILD_RELACY_TESTS_DEFAULT ON )
157164else ()
158- set (STDEXEC_BUILD_RELACY_TESTS_DEFAULT OFF )
165+ set (STDEXEC_BUILD_RELACY_TESTS_DEFAULT OFF )
159166endif ()
160167option (STDEXEC_BUILD_RELACY_TESTS "Build stdexec relacy tests" ${STDEXEC_BUILD_RELACY_TESTS_DEFAULT} )
161168
Original file line number Diff line number Diff line change 1+ // Temporary workaround until upstream Relacy provides a fakestd header for shared_mutex
2+ // stdexec pulls in shared_mutex through TBB,
3+ // In file included from /usr/include/c++/13/shared_mutex:42,
4+ // from /usr/include/c++/13/memory_resource:62,
5+ // from /usr/include/oneapi/tbb/cache_aligned_allocator.h:26,
6+ // from /usr/include/oneapi/tbb/partitioner.h:46,
7+ // from /usr/include/oneapi/tbb/parallel_for.h:27,
8+ // from /usr/include/tbb/parallel_for.h:17,
9+ // from /usr/include/c++/13/pstl/parallel_backend_tbb.h:20,
10+ // from /usr/include/c++/13/pstl/parallel_backend.h:20,
11+ // from /usr/include/c++/13/pstl/algorithm_impl.h:22,
12+ // from /usr/include/c++/13/pstl/glue_execution_defs.h:50,
13+ // from /usr/include/c++/13/execution:34,
14+ // from /home/coder/stdexec/test/rrd/../../include/exec/../stdexec/__detail/__execution_legacy.hpp:21,
15+ #pragma once
You can’t perform that action at this time.
0 commit comments