summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-07-25 23:08:26 +0200
committerGitHub <noreply@github.com>2022-07-25 23:08:26 +0200
commit3e0e84a54c1c5666c32dbc2abd419b61e071ba33 (patch)
tree0731f0bc3f2702984182d0b65e9d048bdfff3300
parent25a7cdc97f4c334d873574b62e24048076752eed (diff)
parentd8900e0020b21d449069ef2a301253371fb70a21 (diff)
Merge pull request #63459 from Kev/bigobj-for-msvc-release
-rw-r--r--platform/windows/detect.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index b82fe5e7ad..6a7caf4656 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -198,7 +198,6 @@ def configure_msvc(env, manual_msvc_config):
elif env["target"] == "debug":
env.AppendUnique(CCFLAGS=["/Zi", "/FS", "/Od", "/EHsc"])
# Allow big objects. Only needed for debug, see MinGW branch for rationale.
- env.AppendUnique(CCFLAGS=["/bigobj"])
env.Append(LINKFLAGS=["/DEBUG"])
if env["debug_symbols"]:
@@ -221,6 +220,10 @@ def configure_msvc(env, manual_msvc_config):
env.AppendUnique(CCFLAGS=["/Gd", "/GR", "/nologo"])
env.AppendUnique(CCFLAGS=["/utf-8"]) # Force to use Unicode encoding.
env.AppendUnique(CXXFLAGS=["/TP"]) # assume all sources are C++
+ # Once it was thought that only debug builds would be too large,
+ # but this has recently stopped being true. See the mingw function
+ # for notes on why this shouldn't be enabled for gcc
+ env.AppendUnique(CCFLAGS=["/bigobj"])
if manual_msvc_config: # should be automatic if SCons found it
if os.getenv("WindowsSdkDir") is not None: