From eccb7fddb054df7029c5246aa69f3dfaa686cc92 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Thu, 11 Sep 2025 11:45:25 -0600 Subject: [PATCH] CMake: Win: Disable fastlink for VS2026 This option has been removed in vs2026 and will cause a build error, disabling this option results in our default /DEBUG being used which is equivalent to /debug:full which is the suggested replacement --- build_files/cmake/platform/platform_win32.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index b527f774d50..4c99e636a6b 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -295,9 +295,13 @@ endif() string(APPEND PLATFORM_LINKFLAGS " /SUBSYSTEM:CONSOLE /STACK:2097152") set(PLATFORM_LINKFLAGS_RELEASE "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib") -if(NOT WITH_COMPILER_ASAN) - # ASAN is incompatible with `fastlink`, it will appear to work, - # but will not resolve symbols which makes it somewhat useless. +if( + (NOT WITH_COMPILER_ASAN) AND + # ASAN is incompatible with `fastlink`, it will appear to work, + # but will not resolve symbols which makes it somewhat useless. + MSVC_VERSION LESS 1950 + # /debug:fastlink is no longer supported in vs2026 + ) string(APPEND PLATFORM_LINKFLAGS_DEBUG "/debug:fastlink ") endif() string(APPEND PLATFORM_LINKFLAGS_DEBUG " /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib")