[llvm] r191372 - Set the minimal stack size with msvc when using cmake >= 2.8.11.

Rafael Espindola rafael.espindola at gmail.com
Wed Sep 25 07:06:55 PDT 2013


Author: rafael
Date: Wed Sep 25 09:06:55 2013
New Revision: 191372

URL: http://llvm.org/viewvc/llvm-project?rev=191372&view=rev
Log:
Set the minimal stack size with msvc when using cmake >= 2.8.11.

This makes sure we get the same behavior with all supported cmake versions. Once
we support only versions >= 2.8.11 we can experiment with other values or just
setting it for some binaries.

Patch by Greg Bedwell.

Modified:
    llvm/trunk/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=191372&r1=191371&r2=191372&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Wed Sep 25 09:06:55 2013
@@ -22,6 +22,15 @@ if ( LLVM_USE_FOLDERS )
   set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 endif()
 
+if(MSVC AND NOT (${CMAKE_VERSION} VERSION_LESS 2.8.11))
+  # set stack reserved size to ~10MB
+  # CMake previously automatically set this value for MSVC builds, but the
+  # behavior was changed in CMake 2.8.11 (Issue 12437) to use the MSVC default
+  # value (1 MB) which is not enough for us in tasks such as parsing recursive
+  # C++ templates in Clang.
+  set(CMAKE_CXX_STACK_SIZE "10000000")
+endif()
+
 include(VersionFromVCS)
 
 option(LLVM_APPEND_VC_REV





More information about the llvm-commits mailing list