From 188b0e9e37d6f47b65c60d81a2b07206b3d5488b Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 13 Feb 2013 13:19:07 -0500 Subject: [PATCH] Embarcadero: Fix default link stack/heap flags (#13912) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit c70beb4b (change the default borland stack size, 2003-05-05), commit 1b572eb9 (remove -H flags, 2003-05-08), and commit 2d411398 (Stack size in generated programs should be 10 meg, 2003-06-12) CMake adds link flags to select a 10MB stack. At the time this was for consistency with our behavior on MS, but that was recently removed by commit 51af1da3 (Remove "/STACK:10000000" from default linker flags, 2012-11-23). Change our Embarcadero link flags to select the default stack and heap settings according to the compiler documentation. This is more reliable than leaving the flags out completely as it has been reported that the linker does not always use its documented defaults. Suggested-by: Mathäus Mendel --- Modules/Platform/Windows-Embarcadero.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake index 1662ac969..307230e34 100644 --- a/Modules/Platform/Windows-Embarcadero.cmake +++ b/Modules/Platform/Windows-Embarcadero.cmake @@ -64,7 +64,7 @@ set(CMAKE_CREATE_CONSOLE_EXE "${_tC}" ) set (CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.") -set (CMAKE_EXE_LINKER_FLAGS_INIT "${_tM} -lS:10000000 -lSc:10000000 ") +set (CMAKE_EXE_LINKER_FLAGS_INIT "${_tM} -lS:1048576 -lSc:4098 -lH:1048576 -lHc:8192 ") set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "-v") set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "-v") set (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})