Skip to content

Commit

Permalink
Merge pull request #37115 from RandomShaper/imvu/windows_stack_size
Browse files Browse the repository at this point in the history
Make stack size on Windows match Linux and MacOS
  • Loading branch information
akien-mga committed Mar 18, 2020
2 parents 194d2cc + 29f8530 commit 0d907a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions platform/windows/detect.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import methods
import os

# To match other platforms
STACK_SIZE = 8388608


def is_active():
return True
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 0d907a6

Please sign in to comment.