diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-10-14 12:01:22 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-10-14 12:01:28 +0200 |
commit | e2dfb656f4508643acf38014dd8461782505ba12 (patch) | |
tree | 80c1bf84a660d1c6dd2b18b956758c7df0428c0e /platform/windows | |
parent | 0eed8d8386850f887c024730816e8044ad742a2b (diff) |
SCons: Add `DEV_ENABLED` defines for `target=debug` builds
This will allow adding developer checks which will be fully compiled out in
user builds, unlike `DEBUG_ENABLED` which is included in debug tempates and
the editor builds.
This define is not used yet, but we'll soon add code that uses it, and change
some existing `DEBUG_ENABLED` checks to be performed only in dev builds.
Related to godotengine/godot-proposals#3371.
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/detect.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 3961480d23..6f99368e99 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -208,6 +208,7 @@ def configure_msvc(env, manual_msvc_config): elif env["target"] == "debug": env.AppendUnique(CCFLAGS=["/Zi", "/FS", "/Od", "/EHsc"]) env.AppendUnique(CPPDEFINES=["DEBUG_ENABLED"]) + env.AppendUnique(CPPDEFINES=["DEV_ENABLED"]) env.Append(LINKFLAGS=["/DEBUG"]) if env["debug_symbols"]: @@ -362,6 +363,7 @@ def configure_mingw(env): elif env["target"] == "debug": env.Append(CCFLAGS=["-g3"]) env.Append(CPPDEFINES=["DEBUG_ENABLED"]) + env.Append(CPPDEFINES=["DEV_ENABLED"]) if env["windows_subsystem"] == "gui": env.Append(LINKFLAGS=["-Wl,--subsystem,windows"]) |