summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-11-10 17:48:35 +0100
committerGitHub <noreply@github.com>2021-11-10 17:48:35 +0100
commit9b6897307cec9465c11ad522a9e21c8923c2c189 (patch)
treec61e9d5c449889f38c3378cf74f6f0ce4fbd768f
parenta0c28777bfd087eb351dc9abf0591745b315bc7d (diff)
parent11d1319afd3050862cb0a800e323278984742fb1 (diff)
Merge pull request #54837 from akien-mga/windows-bigobj
-rw-r--r--platform/windows/detect.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 22fbbeb74f..20deb35089 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -226,9 +226,10 @@ def configure_msvc(env, manual_msvc_config):
env.AppendUnique(CCFLAGS=["/MD"])
env.AppendUnique(CCFLAGS=["/Gd", "/GR", "/nologo"])
- # Force to use Unicode encoding
- env.AppendUnique(CCFLAGS=["/utf-8"])
+ env.AppendUnique(CCFLAGS=["/utf-8"]) # Force to use Unicode encoding.
+ env.AppendUnique(CCFLAGS=["/bigobj"]) # Allow big objects, no drawbacks.
env.AppendUnique(CXXFLAGS=["/TP"]) # assume all sources are C++
+
if manual_msvc_config: # should be automatic if SCons found it
if os.getenv("WindowsSdkDir") is not None:
env.Prepend(CPPPATH=[os.getenv("WindowsSdkDir") + "/Include"])
@@ -421,6 +422,7 @@ def configure_mingw(env):
## Compile flags
env.Append(CCFLAGS=["-mwindows"])
+ env.Append(CCFLAGS=["-Wa,-mbig-obj"]) # Allow big objects, no drawbacks.
env.Append(CPPDEFINES=["WINDOWS_ENABLED", "WASAPI_ENABLED", "WINMIDI_ENABLED"])
env.Append(CPPDEFINES=[("WINVER", env["target_win_version"]), ("_WIN32_WINNT", env["target_win_version"])])