From b97a1aeca29bb898071700a89b21187edc761a67 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 14 Apr 2019 15:11:07 +0300 Subject: [PATCH] Increase max stack size to 8 MB on Windows Default is 1 MB and it could cause problems in compiling heavy SPU LLVM functions. --- rpcs3/cmake_modules/ConfigureCompiler.cmake | 6 ++++++ rpcs3_default.props | 2 ++ 2 files changed, 8 insertions(+) diff --git a/rpcs3/cmake_modules/ConfigureCompiler.cmake b/rpcs3/cmake_modules/ConfigureCompiler.cmake index 2f719721fa..bfb527177a 100644 --- a/rpcs3/cmake_modules/ConfigureCompiler.cmake +++ b/rpcs3/cmake_modules/ConfigureCompiler.cmake @@ -44,6 +44,9 @@ if(NOT MSVC) # Workaround for mingw64 (MSYS2) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--allow-multiple-definition") + # Increase stack limit to 8 MB + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--stack -Wl,8388608") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_FORMAT_MACROS=1") endif() @@ -76,6 +79,9 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D _ENABLE_EXTENDED_ALIGNED_STORAGE=1") + # Increase stack limit to 8 MB + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /STACK:8388608,1048576") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /BASE:0x10000 /FIXED") endif() diff --git a/rpcs3_default.props b/rpcs3_default.props index 3e9cfcac6a..2c47a47ccd 100644 --- a/rpcs3_default.props +++ b/rpcs3_default.props @@ -24,6 +24,8 @@ xxhash.lib;ws2_32.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib ..\3rdparty\ffmpeg\Windows\x86_64\lib + 8388608 + 1048576