llvm.org GIT mirror llvm / acc1f8b
CMake: set stack size to 2MB for MSVC builds Compiling under Visual C++ 2012 with the default stack size of 1MB, the stack overflows at a depth of 216 template instantiations, well before the 256 default limit. This patch modifies the default MSVC stack size to 2MB. Patch by Yaron Keren! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192904 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 6 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
152152 if( MSVC )
153153 include(ChooseMSVCCRT)
154154
155 # Visual C++ default stack size is 1MB. This is not enough for clang to
156 # instantiate templates up to the default maximum depth allowed, 256.
157 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -STACK:2097152")
158
155159 if( MSVC10 )
156160 # MSVC 10 will complain about headers in the STL not being exported, but
157161 # will not complain in MSVC 11.