Commit 18a78077 authored by Jose Fonseca's avatar Jose Fonseca

cmake: Match MSVC default stack size on MinGW builds.

MSVC defaults to 1MB stack size.  MinGW defaults to a larger value.
But in order to trap problems with excessive usage of the stack on
Windows we really want to match MSVC.
Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
parent 0662f6a7
......@@ -264,6 +264,9 @@ else ()
endif ()
if (MINGW)
# Match MSVC default stack size
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,1048576")
# Avoid depending on MinGW runtime DLLs
check_cxx_compiler_flag (-static-libgcc HAVE_STATIC_LIBGCC_FLAG)
if (HAVE_STATIC_LIBGCC_FLAG)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment