summaryrefslogtreecommitdiff
path: root/platform/windows/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r--platform/windows/detect.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index d239ccf7d2..5bd9a78f49 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -123,7 +123,7 @@ def configure(env):
env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup'])
elif (env["target"] == "debug"):
- env.Append(CCFLAGS=['/Z7', '/DDEBUG_ENABLED', '/DDEBUG_MEMORY_ENABLED', '/DD3D_DEBUG_INFO', '/Od'])
+ env.Append(CCFLAGS=['/Z7', '/DDEBUG_ENABLED', '/DDEBUG_MEMORY_ENABLED', '/DD3D_DEBUG_INFO', '/Od', '/EHsc'])
env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE'])
env.Append(LINKFLAGS=['/DEBUG'])
@@ -226,10 +226,13 @@ def configure(env):
else:
env["PROGSUFFIX"] = env["PROGSUFFIX"] + ".exe" # for linux cross-compilation
- mingw_prefix = ""
-
if (env["bits"] == "default"):
- env["bits"] = "64" if "PROGRAMFILES(X86)" in os.environ else "32"
+ if (os.name == "nt"):
+ env["bits"] = "64" if "PROGRAMFILES(X86)" in os.environ else "32"
+ else: # default to 64-bit on Linux
+ env["bits"] = "64"
+
+ mingw_prefix = ""
if (env["bits"] == "32"):
env.Append(LINKFLAGS=['-static'])