Skip to content

Commit

Permalink
Merge pull request secure-software-engineering#341 from secure-softwa…
Browse files Browse the repository at this point in the history
…re-engineering/f-FixTSANWithTest

Only add TSAN for testing when compatible
  • Loading branch information
pdschubert authored May 7, 2021
2 parents 604b83a + 496fc2a commit e402e95
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions unittests/PhasarLLVM/DataFlowSolver/IfdsIde/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ set(ThreadedIfdsIdeSources
EdgeFunctionSingletonFactoryTest.cpp
)

if(UNIX)
# Append -fno-omit-frame-pointer to get better stack traces.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=thread")
if(UNIX AND CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
# Only add thread sanitizer for the test if asan is disabled because both
# cannot be active at the same time.
if (NOT "${LLVM_USE_SANITIZER}" MATCHES ".*Address.*")
# Append -fno-omit-frame-pointer to get better stack traces.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=thread")
endif()
endif()

foreach(TEST_SRC ${ThreadedIfdsIdeSources})
Expand Down

0 comments on commit e402e95

Please sign in to comment.