From 6afb9d327e143e2f3f3d905a1a1a7477ef340b83 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Tue, 9 Feb 2021 00:20:42 +1100 Subject: [PATCH] Use /Zi and /FS for including debugger symbols on Windows with MSVC (cherry picked from commit 4946ae16fcc3299326b4b7105dbe20646ceddb17) --- platform/windows/detect.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index c9facb2261f..cf99718e4d4 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -194,13 +194,13 @@ def configure_msvc(env, manual_msvc_config): env.Append(LINKFLAGS=["/OPT:REF"]) elif env["target"] == "debug": - env.AppendUnique(CCFLAGS=["/Z7", "/Od", "/EHsc"]) + env.AppendUnique(CCFLAGS=["/Zi", "/FS", "/Od", "/EHsc"]) env.AppendUnique(CPPDEFINES=["DEBUG_ENABLED"]) env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"]) env.Append(LINKFLAGS=["/DEBUG"]) if env["debug_symbols"]: - env.AppendUnique(CCFLAGS=["/Z7"]) + env.AppendUnique(CCFLAGS=["/Zi", "/FS"]) env.AppendUnique(LINKFLAGS=["/DEBUG"]) ## Compile/link flags @@ -209,6 +209,7 @@ def configure_msvc(env, manual_msvc_config): env.AppendUnique(CCFLAGS=["/MT"]) else: env.AppendUnique(CCFLAGS=["/MD"]) + env.AppendUnique(CCFLAGS=["/Gd", "/GR", "/nologo"]) # Force to use Unicode encoding env.AppendUnique(CCFLAGS=["/utf-8"])