Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make asan/tsan link on macOS, add tsan cache variable #1593

Merged
merged 1 commit into from
Jan 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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