From f87f98015ca0def0faa717748ace151aeff39c40 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 15 Oct 2017 19:04:19 -0400 Subject: [PATCH] 16MB stack size when building with msvc fixes crash when evaluating user code that hits the branch limit See #302 --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26489b52c2..f27404a530 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -375,6 +375,8 @@ endif() set(EXE_LDFLAGS " ") if(MINGW) set(EXE_LDFLAGS "-static -static-libgcc -static-libstdc++") +elseif(MSVC) + set(EXE_LDFLAGS "/STACK:16777216") else() set(EXE_LDFLAGS " ") endif()