CMake/MSVC: Use /debug:fastlink for debug builds
This changes the default linker options for debug builds to use fastlinking, this causes the PDB only to be usable on the machine it is being created on, however since debug builds cannot be distributed to end users (wont run due to missing debug CRT on their system) this isn't a problem. This halves the time required for an incremental link on my system from 7->3.5 seconds
This commit is contained in:
@@ -249,7 +249,7 @@ endif()
|
|||||||
|
|
||||||
string(APPEND PLATFORM_LINKFLAGS " /SUBSYSTEM:CONSOLE /STACK:2097152")
|
string(APPEND PLATFORM_LINKFLAGS " /SUBSYSTEM:CONSOLE /STACK:2097152")
|
||||||
set(PLATFORM_LINKFLAGS_RELEASE "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
|
set(PLATFORM_LINKFLAGS_RELEASE "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
|
||||||
string(APPEND PLATFORM_LINKFLAGS_DEBUG " /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib")
|
string(APPEND PLATFORM_LINKFLAGS_DEBUG "/debug:fastlink /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib")
|
||||||
|
|
||||||
# Ignore meaningless for us linker warnings.
|
# Ignore meaningless for us linker warnings.
|
||||||
string(APPEND PLATFORM_LINKFLAGS " /ignore:4049 /ignore:4217 /ignore:4221")
|
string(APPEND PLATFORM_LINKFLAGS " /ignore:4049 /ignore:4217 /ignore:4221")
|
||||||
|
|||||||
Reference in New Issue
Block a user