summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/HandleLLVMOptions.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
index 2cec270e96..4063429406 100644
--- a/cmake/modules/HandleLLVMOptions.cmake
+++ b/cmake/modules/HandleLLVMOptions.cmake
@@ -153,6 +153,10 @@ endif()
if( MSVC )
include(ChooseMSVCCRT)
+ # Visual C++ default stack size is 1MB. This is not enough for clang to
+ # instantiate templates up to the default maximum depth allowed, 256.
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -STACK:2097152")
+
if( MSVC10 )
# MSVC 10 will complain about headers in the STL not being exported, but
# will not complain in MSVC 11.