use /debug:fastlink when building with msvc and debug info

master
Sahnvour 2019-09-08 12:07:23 +02:00 committed by Andrew Kelley
parent 0d9a78a852
commit 19cf9bd062
1 changed files with 3 additions and 0 deletions

View File

@ -516,6 +516,9 @@ set(OPTIMIZED_C_FLAGS "-std=c99 -O3")
set(EXE_LDFLAGS " ")
if(MSVC)
set(EXE_LDFLAGS "${EXE_LDFLAGS} /STACK:16777216")
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
set(EXE_LDFLAGS "${EXE_LDFLAGS} /debug:fastlink")
endif()
elseif(MINGW)
set(EXE_LDFLAGS "${EXE_LDFLAGS} -Wl,--stack,16777216")
endif()