Merge pull request #4142 from aarlt/osx-clang-stack

cmake/EthCompilerSettings.cmake: increase stacksize for apple clang
This commit is contained in:
chriseth 2018-05-15 16:57:03 +02:00 committed by GitHub
commit 007ecc849c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,8 +62,9 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
# Additional Clang-specific compiler settings. # Additional Clang-specific compiler settings.
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
# Set stack size to 16MB - by default Apple's clang defines a stack size of 8MB, some tests require more. # Set stack size to 32MB - by default Apple's clang defines a stack size of 8MB.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-stack_size -Wl,0x1000000") # Normally 16MB is enough to run all tests, but it will exceed the stack, if -DSANITIZE=address is used.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-stack_size -Wl,0x2000000")
endif() endif()
# Some Linux-specific Clang settings. We don't want these for OS X. # Some Linux-specific Clang settings. We don't want these for OS X.