From f3aa3f90138a6fa8aee035b1ee184af73615f901 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Jul 2025 19:38:33 +0100 Subject: [PATCH] /Zi not supported by linked. Need to use /DEBUG. /DEBUG turns off /OPT:REF /OPT:ICF by default, so need to explictly switch them back on. --- cmake/Modules/CompilerOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/CompilerOptions.cmake b/cmake/Modules/CompilerOptions.cmake index d5b1d96e2..2f767db02 100644 --- a/cmake/Modules/CompilerOptions.cmake +++ b/cmake/Modules/CompilerOptions.cmake @@ -34,7 +34,7 @@ else() if(CMAKE_BUILD_TYPE MATCHES "Release") # Include stripped debug info in release builds so crash handler can generate stack trace with function names add_compile_options(/Zi) - add_link_options(/Zi /PDBSTRIPPED:$/$stripped.pdb) + add_link_options(/DEBUG /OPT:REF /OPT:ICF /PDBSTRIPPED:$/$stripped.pdb) endif() endif()