summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-05 18:05:40 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-05 18:05:40 +0100
commite742354b84876c584bcc26f00b2ed62c87ed8369 (patch)
treed207ccac62a9ed4680975ad6fb1cd666564a6d41 /platform
parentd759210f5281e6a8e813b47cbca0f41ce9ebbdf1 (diff)
parent5c6e2b2cac267cea1f01a31e6af2348612216329 (diff)
Merge pull request #69609 from akien-mga/windows-msvc-debug-crt-opt-in
Windows: Make MSVC debug CRT opt-in (`debug_crt=yes`)
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/detect.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 2b1ed64f4a..1b55574b19 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -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),
]
@@ -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: