Skip to content

Commit

Permalink
Windows: Make MSVC debug CRT opt-in (debug_crt=yes)
Browse files Browse the repository at this point in the history
Follow-up to godotengine#69294 which enabled it automatically for `dev_build=yes`,
but this seems to cause some issues.
Those issues should likely be debugged but until then this can stay opt-in.
  • Loading branch information
akien-mga authored and rohanrhu committed Dec 28, 2022
1 parent 8c8e697 commit aa251b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platform/windows/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ def get_opts():
BoolVariable("use_llvm", "Use the LLVM compiler", False),
BoolVariable("use_static_cpp", "Link MinGW/MSVC C++ runtime libraries statically", True),
BoolVariable("use_asan", "Use address sanitizer (ASAN)", False),
BoolVariable("debug_crt", "Compile with MSVC's debug CRT (/MDd)", False),
]


Expand Down Expand Up @@ -339,7 +340,7 @@ def configure_msvc(env, vcvars_msvc_config):

## Compile/link flags

if env["optimize"] in ["debug", "none"]:
if env["debug_crt"]:
# Always use dynamic runtime, static debug CRT breaks thread_local.
env.AppendUnique(CCFLAGS=["/MDd"])
else:
Expand Down

0 comments on commit aa251b5

Please sign in to comment.