summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorelasota <ejlasota@gmail.com>2018-08-19 01:37:53 -0400
committerelasota <ejlasota@gmail.com>2018-08-19 01:37:53 -0400
commitffe0235f627f96f084c57cf8e91eba1f0ea977ab (patch)
tree7e5c736b50f24a014eb0be945af7fa22dc4f9717 /platform
parentc93888ae71bcc2b633f335b407c75412a493012d (diff)
Support debug_symbols in VS optimized builds
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/detect.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 34fc3e09b5..7667de160d 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -172,6 +172,7 @@ def configure_msvc(env, manual_msvc_config):
env.Append(CCFLAGS=['/O1'])
env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS'])
env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup'])
+ env.Append(LINKFLAGS=['/OPT:REF'])
elif (env["target"] == "release_debug"):
if (env["optimize"] == "speed"): #optimize for speed (default)
@@ -180,6 +181,7 @@ def configure_msvc(env, manual_msvc_config):
env.Append(CCFLAGS=['/O1'])
env.AppendUnique(CPPDEFINES = ['DEBUG_ENABLED'])
env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE'])
+ env.Append(LINKFLAGS=['/OPT:REF'])
elif (env["target"] == "debug_release"):
env.Append(CCFLAGS=['/Z7', '/Od'])
@@ -194,6 +196,10 @@ def configure_msvc(env, manual_msvc_config):
env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE'])
env.Append(LINKFLAGS=['/DEBUG'])
+ if (env["debug_symbols"] == "full" or env["debug_symbols"] == "yes"):
+ env.AppendUnique(CCFLAGS=['/Z7'])
+ env.AppendUnique(LINKFLAGS=['/DEBUG'])
+
## Compile/link flags
env.AppendUnique(CCFLAGS=['/MT', '/Gd', '/GR', '/nologo'])