[Piglit] [PATCH 2/2] cmake: Match MSVC default stack size on MinGW builds.

Brian Paul brianp at vmware.com
Tue Jul 14 07:39:24 PDT 2015


On 07/14/2015 08:34 AM, Jose Fonseca wrote:
> 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.
> ---
>   CMakeLists.txt | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 3ae892d..99d9a8e 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -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)
>

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the Piglit mailing list