summaryrefslogtreecommitdiff
path: root/platform/windows/detect.py
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2020-08-17 19:05:48 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2020-08-17 19:05:48 +0300
commit03ffd6451ac23975ed9446a6ffb4a7cbbdd39e62 (patch)
tree997fcf497cc003c3c68c81a5a3b06784ed263ac4 /platform/windows/detect.py
parentba1109a3b3596d263182836c4f45cbffd12ac8f2 (diff)
Revert "[Windows] Attach to parent console instead of creating new one."
This reverts commit 4f7a49db53c6aaabeca70fe8901144af708fb6b2.
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r--platform/windows/detect.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index a9f25fa078..271ffc8871 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -183,6 +183,7 @@ def configure_msvc(env, manual_msvc_config):
env.Append(CCFLAGS=["/O2"])
else: # optimize for size
env.Append(CCFLAGS=["/O1"])
+ env.Append(LINKFLAGS=["/SUBSYSTEM:WINDOWS"])
env.Append(LINKFLAGS=["/ENTRY:mainCRTStartup"])
env.Append(LINKFLAGS=["/OPT:REF"])
@@ -192,15 +193,15 @@ def configure_msvc(env, manual_msvc_config):
else: # optimize for size
env.Append(CCFLAGS=["/O1"])
env.AppendUnique(CPPDEFINES=["DEBUG_ENABLED"])
+ env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"])
env.Append(LINKFLAGS=["/OPT:REF"])
elif env["target"] == "debug":
env.AppendUnique(CCFLAGS=["/Z7", "/Od", "/EHsc"])
env.AppendUnique(CPPDEFINES=["DEBUG_ENABLED"])
+ env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"])
env.Append(LINKFLAGS=["/DEBUG"])
- env.Append(LINKFLAGS=["/SUBSYSTEM:WINDOWS"])
-
if env["debug_symbols"] == "full" or env["debug_symbols"] == "yes":
env.AppendUnique(CCFLAGS=["/Z7"])
env.AppendUnique(LINKFLAGS=["/DEBUG"])
@@ -313,6 +314,8 @@ def configure_mingw(env):
else: # optimize for size
env.Prepend(CCFLAGS=["-Os"])
+ env.Append(LINKFLAGS=["-Wl,--subsystem,windows"])
+
if env["debug_symbols"] == "yes":
env.Prepend(CCFLAGS=["-g1"])
if env["debug_symbols"] == "full":
@@ -334,8 +337,6 @@ def configure_mingw(env):
env.Append(CCFLAGS=["-g3"])
env.Append(CPPDEFINES=["DEBUG_ENABLED"])
- env.Append(LINKFLAGS=["-Wl,--subsystem,windows"])
-
## Compiler configuration
if os.name != "nt":