Make stack size on Windows match Linux and MacOS

This commit is contained in:
Pedro J. Estébanez 2020-03-17 18:17:41 +01:00
parent b8577ecce1
commit 29f8530afe
1 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,9 @@
import methods
import os
# To match other platforms
STACK_SIZE = 8388608
def is_active():
return True
@ -259,6 +262,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
@ -351,6 +356,7 @@ def configure_mingw(env):
env.Append(CCFLAGS=['-flto'])
env.Append(LINKFLAGS=['-flto'])
env.Append(LINKFLAGS=['-Wl,--stack,' + str(STACK_SIZE)])
## Compile flags