From f57579ba6c4ce5cbb8bd7a360f3e4d57ca41d3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Tue, 17 Mar 2020 18:17:41 +0100 Subject: [PATCH] Make stack size on Windows match Linux and MacOS (cherry picked from commit 29f8530afedb56ebfca1248fbd4a9010bdd23308) --- platform/windows/detect.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 500736bd3fa..782fbcb754c 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -1,6 +1,9 @@ import methods import os +# To match other platforms +STACK_SIZE = 8388608 + def is_active(): return True @@ -249,6 +252,8 @@ def configure_msvc(env, manual_msvc_config): env['BUILDERS']['ProgramOriginal'] = env['BUILDERS']['Program'] env['BUILDERS']['Program'] = methods.precious_program + env.AppendUnique(LINKFLAGS=['/STACK:' + str(STACK_SIZE)]) + def configure_mingw(env): # Workaround for MinGW. See: # http://www.scons.org/wiki/LongCmdLinesOnWin32 @@ -346,6 +351,7 @@ def configure_mingw(env): env.Append(CCFLAGS=['-flto']) env.Append(LINKFLAGS=['-flto']) + env.Append(LINKFLAGS=['-Wl,--stack,' + str(STACK_SIZE)]) ## Compile flags