Skip to content

Commit

Permalink
Make asan/tsan link on macos, add tsan cache variable (#1593)
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptocode authored and rkeene committed Jan 23, 2019
1 parent 24d3b75 commit 185bc41
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ set (NANO_SECURE_RPC OFF CACHE BOOL "")

option(NANO_ASAN_INT "Enable ASan+UBSan+Integer overflow" OFF)
option(NANO_ASAN "Enable ASan+UBSan" OFF)
option(NANO_TSAN "Enable TSan" OFF)
option(NANO_SIMD_OPTIMIZATIONS "Enable CPU-specific SIMD optimizations (SSE/AVX or NEON, e.g.)" OFF)

SET (ACTIVE_NETWORK nano_live_network CACHE STRING "Selects which network parameters are used")
Expand Down Expand Up @@ -79,15 +80,15 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
#set(CMAKE_CXX_EXTENSIONS OFF)

if (WIN32)
add_definitions(/bigobj)
endif ()

if (APPLE)
set (PLATFORM_LINK_FLAGS "-framework Foundation -framework OpenCL")
elseif (WIN32)
set (PLATFORM_LINK_FLAGS "")
add_definitions(/bigobj)
else ()
set (PLATFORM_LINK_FLAGS "-static-libgcc -static-libstdc++")
if (APPLE)
set (PLATFORM_LINK_FLAGS "-framework Foundation -framework OpenCL")
else ()
set (PLATFORM_LINK_FLAGS "-static-libgcc -static-libstdc++")
endif ()

if (NANO_ASAN OR RAIBLOCKS_ASAN)
set (PLATFORM_LINK_FLAGS "${PLATFORM_LINK_FLAGS} -fsanitize=address,undefined")
elseif (NANO_ASAN_INT OR RAIBLOCKS_ASAN_INT)
Expand Down

0 comments on commit 185bc41

Please sign in to comment.