mirror of https://github.com/godotengine/godot
Merge pull request #69609 from akien-mga/windows-msvc-debug-crt-opt-in
Windows: Make MSVC debug CRT opt-in (`debug_crt=yes`)
This commit is contained in:
commit
e742354b84
|
|
@ -188,6 +188,7 @@ def get_opts():
|
||||||
BoolVariable("use_llvm", "Use the LLVM compiler", False),
|
BoolVariable("use_llvm", "Use the LLVM compiler", False),
|
||||||
BoolVariable("use_static_cpp", "Link MinGW/MSVC C++ runtime libraries statically", True),
|
BoolVariable("use_static_cpp", "Link MinGW/MSVC C++ runtime libraries statically", True),
|
||||||
BoolVariable("use_asan", "Use address sanitizer (ASAN)", False),
|
BoolVariable("use_asan", "Use address sanitizer (ASAN)", False),
|
||||||
|
BoolVariable("debug_crt", "Compile with MSVC's debug CRT (/MDd)", False),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -339,7 +340,7 @@ def configure_msvc(env, vcvars_msvc_config):
|
||||||
|
|
||||||
## Compile/link flags
|
## Compile/link flags
|
||||||
|
|
||||||
if env["optimize"] in ["debug", "none"]:
|
if env["debug_crt"]:
|
||||||
# Always use dynamic runtime, static debug CRT breaks thread_local.
|
# Always use dynamic runtime, static debug CRT breaks thread_local.
|
||||||
env.AppendUnique(CCFLAGS=["/MDd"])
|
env.AppendUnique(CCFLAGS=["/MDd"])
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue