Merge pull request #53799 from akien-mga/DEV_ENABLED

This commit is contained in:
Rémi Verschelde 2021-10-14 13:24:20 +02:00 committed by GitHub
commit d952a84c3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 0 deletions

View File

@ -203,6 +203,7 @@ def configure(env):
env.Append(LINKFLAGS=["-O0"]) env.Append(LINKFLAGS=["-O0"])
env.Append(CCFLAGS=["-O0", "-g", "-fno-limit-debug-info"]) env.Append(CCFLAGS=["-O0", "-g", "-fno-limit-debug-info"])
env.Append(CPPDEFINES=["_DEBUG", "DEBUG_ENABLED"]) env.Append(CPPDEFINES=["_DEBUG", "DEBUG_ENABLED"])
env.Append(CPPDEFINES=["DEV_ENABLED"])
env.Append(CPPFLAGS=["-UNDEBUG"]) env.Append(CPPFLAGS=["-UNDEBUG"])
# Compiler configuration # Compiler configuration

View File

@ -59,6 +59,7 @@ def configure(env):
elif env["target"] == "debug": elif env["target"] == "debug":
env.Append(CCFLAGS=["-gdwarf-2", "-O0"]) env.Append(CCFLAGS=["-gdwarf-2", "-O0"])
env.Append(CPPDEFINES=["_DEBUG", ("DEBUG", 1), "DEBUG_ENABLED"]) env.Append(CPPDEFINES=["_DEBUG", ("DEBUG", 1), "DEBUG_ENABLED"])
env.Append(CPPDEFINES=["DEV_ENABLED"])
if env["use_lto"]: if env["use_lto"]:
env.Append(CCFLAGS=["-flto"]) env.Append(CCFLAGS=["-flto"])

View File

@ -82,6 +82,7 @@ def configure(env):
env.Append(LINKFLAGS=["--profiling-funcs"]) env.Append(LINKFLAGS=["--profiling-funcs"])
else: # "debug" else: # "debug"
env.Append(CPPDEFINES=["DEBUG_ENABLED"]) env.Append(CPPDEFINES=["DEBUG_ENABLED"])
env.Append(CPPDEFINES=["DEV_ENABLED"])
env.Append(CCFLAGS=["-O1", "-g"]) env.Append(CCFLAGS=["-O1", "-g"])
env.Append(LINKFLAGS=["-O1", "-g"]) env.Append(LINKFLAGS=["-O1", "-g"])
env["use_assertions"] = True env["use_assertions"] = True

View File

@ -113,6 +113,7 @@ def configure(env):
elif env["target"] == "debug": elif env["target"] == "debug":
env.Prepend(CCFLAGS=["-g3"]) env.Prepend(CCFLAGS=["-g3"])
env.Prepend(CPPDEFINES=["DEBUG_ENABLED"]) env.Prepend(CPPDEFINES=["DEBUG_ENABLED"])
env.Prepend(CPPDEFINES=["DEV_ENABLED"])
env.Append(LINKFLAGS=["-rdynamic"]) env.Append(LINKFLAGS=["-rdynamic"])
## Architecture ## Architecture

View File

@ -64,6 +64,7 @@ def configure(env):
elif env["target"] == "debug": elif env["target"] == "debug":
env.Prepend(CCFLAGS=["-g3"]) env.Prepend(CCFLAGS=["-g3"])
env.Prepend(CPPDEFINES=["DEBUG_ENABLED"]) env.Prepend(CPPDEFINES=["DEBUG_ENABLED"])
env.Prepend(CPPDEFINES=["DEV_ENABLED"])
env.Prepend(LINKFLAGS=["-Xlinker", "-no_deduplicate"]) env.Prepend(LINKFLAGS=["-Xlinker", "-no_deduplicate"])
## Architecture ## Architecture

View File

@ -72,6 +72,7 @@ def configure(env):
env.Append(CCFLAGS=["/Zi"]) env.Append(CCFLAGS=["/Zi"])
env.Append(CCFLAGS=["/MDd"]) env.Append(CCFLAGS=["/MDd"])
env.Append(CPPDEFINES=["DEBUG_ENABLED"]) env.Append(CPPDEFINES=["DEBUG_ENABLED"])
env.Append(CPPDEFINES=["DEV_ENABLED"])
env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"]) env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"])
env.AppendUnique(CPPDEFINES=["WINDOWS_SUBSYSTEM_CONSOLE"]) env.AppendUnique(CPPDEFINES=["WINDOWS_SUBSYSTEM_CONSOLE"])
env.Append(LINKFLAGS=["/DEBUG"]) env.Append(LINKFLAGS=["/DEBUG"])

View File

@ -208,6 +208,7 @@ def configure_msvc(env, manual_msvc_config):
elif env["target"] == "debug": elif env["target"] == "debug":
env.AppendUnique(CCFLAGS=["/Zi", "/FS", "/Od", "/EHsc"]) env.AppendUnique(CCFLAGS=["/Zi", "/FS", "/Od", "/EHsc"])
env.AppendUnique(CPPDEFINES=["DEBUG_ENABLED"]) env.AppendUnique(CPPDEFINES=["DEBUG_ENABLED"])
env.AppendUnique(CPPDEFINES=["DEV_ENABLED"])
env.Append(LINKFLAGS=["/DEBUG"]) env.Append(LINKFLAGS=["/DEBUG"])
if env["debug_symbols"]: if env["debug_symbols"]:
@ -362,6 +363,7 @@ def configure_mingw(env):
elif env["target"] == "debug": elif env["target"] == "debug":
env.Append(CCFLAGS=["-g3"]) env.Append(CCFLAGS=["-g3"])
env.Append(CPPDEFINES=["DEBUG_ENABLED"]) env.Append(CPPDEFINES=["DEBUG_ENABLED"])
env.Append(CPPDEFINES=["DEV_ENABLED"])
if env["windows_subsystem"] == "gui": if env["windows_subsystem"] == "gui":
env.Append(LINKFLAGS=["-Wl,--subsystem,windows"]) env.Append(LINKFLAGS=["-Wl,--subsystem,windows"])