From d0fcafbed836021595801d0224b7a40e5e0309ff Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 11 Oct 2021 21:55:26 +0200 Subject: [PATCH] [mono/win] Increase stack size (reserve) to 8MB Fix https://github.com/dotnet/runtime/issues/57141 in windows build. Set the stack size (reserve) to 8MB, which is usually a default on linux. This way we should get similar behavior on windows. --- src/mono/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 823926370dd4ad..58a0a18e80bdfb 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -254,6 +254,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") add_compile_options(/W3) # set warning level 3 add_compile_options(/EHsc) # set exception handling behavior add_compile_options(/FC) # use full pathnames in diagnostics + add_link_options(/STACK:0x800000) # set stack size to 8MB (default is 1MB) if(CMAKE_BUILD_TYPE STREQUAL "Release") add_compile_options(/Oi) # enable intrinsics add_compile_options(/GF) # enable string pooling