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()