From ae2f060f40e93b3e5a4469c755b98919e16acecc Mon Sep 17 00:00:00 2001 From: River <26424577+wusatosi@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:27:16 -0500 Subject: [PATCH] add documentation for /Zi flag --- cmake/msvc-toolchain.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/msvc-toolchain.cmake b/cmake/msvc-toolchain.cmake index 5ca67b7..cf5b533 100644 --- a/cmake/msvc-toolchain.cmake +++ b/cmake/msvc-toolchain.cmake @@ -19,6 +19,8 @@ set(CMAKE_C_COMPILER cl) set(CMAKE_CXX_COMPILER cl) if(BEMAN_BUILDSYS_SANITIZER STREQUAL "MaxSan") + # /Zi flag (add debug symbol) is needed when using address sanitizer + # See C5072: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-c5072 set(SANITIZER_FLAGS "/fsanitize=address /Zi") endif()