SCons: Fix debug_symbols tests after switch to BoolVariable
Bug introduced in #45679.
Fixes part of #45816.
(cherry picked from commit 849c090343
)
Also removes useless `debug_symbols=full` mode.
This commit is contained in:
parent
4211cb3dc7
commit
42d3d9c345
@ -17,5 +17,5 @@ files = [
|
||||
|
||||
prog = env.add_program("#bin/godot", files)
|
||||
|
||||
if env["debug_symbols"] == "yes" and env["separate_debug_symbols"]:
|
||||
if env["debug_symbols"] and env["separate_debug_symbols"]:
|
||||
env.AddPostAction(prog, run_in_subprocess(platform_osx_builders.make_debug_osx))
|
||||
|
@ -41,27 +41,25 @@ def configure(env):
|
||||
## Build type
|
||||
|
||||
if env["target"] == "release":
|
||||
if env["debug_symbols"] != "full":
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Prepend(CCFLAGS=["-O3", "-fomit-frame-pointer", "-ftree-vectorize"])
|
||||
else: # optimize for size
|
||||
env.Prepend(CCFLAGS=["-Os", "-ftree-vectorize"])
|
||||
if env["arch"] != "arm64":
|
||||
env.Prepend(CCFLAGS=["-msse2"])
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Prepend(CCFLAGS=["-O3", "-fomit-frame-pointer", "-ftree-vectorize"])
|
||||
else: # optimize for size
|
||||
env.Prepend(CCFLAGS=["-Os", "-ftree-vectorize"])
|
||||
if env["arch"] != "arm64":
|
||||
env.Prepend(CCFLAGS=["-msse2"])
|
||||
|
||||
if env["debug_symbols"] == "yes":
|
||||
if env["debug_symbols"]:
|
||||
env.Prepend(CCFLAGS=["-g2"])
|
||||
|
||||
elif env["target"] == "release_debug":
|
||||
if env["debug_symbols"] != "full":
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Prepend(CCFLAGS=["-O2"])
|
||||
else: # optimize for size
|
||||
env.Prepend(CCFLAGS=["-Os"])
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Prepend(CCFLAGS=["-O2"])
|
||||
else: # optimize for size
|
||||
env.Prepend(CCFLAGS=["-Os"])
|
||||
|
||||
env.Prepend(CPPDEFINES=["DEBUG_ENABLED"])
|
||||
|
||||
if env["debug_symbols"] == "yes":
|
||||
if env["debug_symbols"]:
|
||||
env.Prepend(CCFLAGS=["-g2"])
|
||||
|
||||
elif env["target"] == "debug":
|
||||
|
@ -57,7 +57,7 @@ def configure(env):
|
||||
else: # optimize for size
|
||||
env.Prepend(CCFLAGS=["-Os"])
|
||||
|
||||
if env["debug_symbols"] == "yes":
|
||||
if env["debug_symbols"]:
|
||||
env.Prepend(CCFLAGS=["-g2"])
|
||||
|
||||
elif env["target"] == "release_debug":
|
||||
@ -67,7 +67,7 @@ def configure(env):
|
||||
env.Prepend(CCFLAGS=["-Os"])
|
||||
env.Prepend(CPPDEFINES=["DEBUG_ENABLED"])
|
||||
|
||||
if env["debug_symbols"] == "yes":
|
||||
if env["debug_symbols"]:
|
||||
env.Prepend(CCFLAGS=["-g2"])
|
||||
|
||||
elif env["target"] == "debug":
|
||||
|
@ -31,5 +31,5 @@ if env["vsproj"]:
|
||||
env.vs_srcs += ["platform/windows/" + str(x)]
|
||||
|
||||
if not os.getenv("VCINSTALLDIR"):
|
||||
if env["debug_symbols"] == "yes" and env["separate_debug_symbols"]:
|
||||
if env["debug_symbols"] and env["separate_debug_symbols"]:
|
||||
env.AddPostAction(prog, run_in_subprocess(platform_windows_builders.make_debug_mingw))
|
||||
|
@ -176,21 +176,19 @@ def configure_msvc(env, manual_msvc_config):
|
||||
# Build type
|
||||
|
||||
if env["target"] == "release":
|
||||
if env["debug_symbols"] != "full":
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Append(CCFLAGS=["/O2"])
|
||||
else: # optimize for size
|
||||
env.Append(CCFLAGS=["/O1"])
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Append(CCFLAGS=["/O2"])
|
||||
else: # optimize for size
|
||||
env.Append(CCFLAGS=["/O1"])
|
||||
env.Append(LINKFLAGS=["/SUBSYSTEM:WINDOWS"])
|
||||
env.Append(LINKFLAGS=["/ENTRY:mainCRTStartup"])
|
||||
env.Append(LINKFLAGS=["/OPT:REF"])
|
||||
|
||||
elif env["target"] == "release_debug":
|
||||
if env["debug_symbols"] != "full":
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Append(CCFLAGS=["/O2"])
|
||||
else: # optimize for size
|
||||
env.Append(CCFLAGS=["/O1"])
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Append(CCFLAGS=["/O2"])
|
||||
else: # optimize for size
|
||||
env.Append(CCFLAGS=["/O1"])
|
||||
env.AppendUnique(CPPDEFINES=["DEBUG_ENABLED"])
|
||||
env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"])
|
||||
env.Append(LINKFLAGS=["/OPT:REF"])
|
||||
@ -201,7 +199,7 @@ def configure_msvc(env, manual_msvc_config):
|
||||
env.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"])
|
||||
env.Append(LINKFLAGS=["/DEBUG"])
|
||||
|
||||
if env["debug_symbols"] == "yes":
|
||||
if env["debug_symbols"]:
|
||||
env.AppendUnique(CCFLAGS=["/Z7"])
|
||||
env.AppendUnique(LINKFLAGS=["/DEBUG"])
|
||||
|
||||
@ -308,16 +306,15 @@ def configure_mingw(env):
|
||||
env.Append(CCFLAGS=["-O2"])
|
||||
else: # optimize for size
|
||||
env.Prepend(CCFLAGS=["-Os"])
|
||||
|
||||
env.Append(LINKFLAGS=["-Wl,--subsystem,windows"])
|
||||
|
||||
if env["debug_symbols"] == "yes":
|
||||
if env["debug_symbols"]:
|
||||
env.Prepend(CCFLAGS=["-g2"])
|
||||
|
||||
elif env["target"] == "release_debug":
|
||||
env.Append(CCFLAGS=["-O2"])
|
||||
env.Append(CPPDEFINES=["DEBUG_ENABLED"])
|
||||
if env["debug_symbols"] == "yes":
|
||||
if env["debug_symbols"]:
|
||||
env.Prepend(CCFLAGS=["-g2"])
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Append(CCFLAGS=["-O2"])
|
||||
|
@ -17,5 +17,5 @@ common_x11 = [
|
||||
|
||||
prog = env.add_program("#bin/godot", ["godot_x11.cpp"] + common_x11)
|
||||
|
||||
if env["debug_symbols"] == "yes" and env["separate_debug_symbols"]:
|
||||
if env["debug_symbols"] and env["separate_debug_symbols"]:
|
||||
env.AddPostAction(prog, run_in_subprocess(platform_x11_builders.make_debug_x11))
|
||||
|
@ -87,25 +87,23 @@ def configure(env):
|
||||
## Build type
|
||||
|
||||
if env["target"] == "release":
|
||||
if env["debug_symbols"] != "full":
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Prepend(CCFLAGS=["-O3"])
|
||||
else: # optimize for size
|
||||
env.Prepend(CCFLAGS=["-Os"])
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Prepend(CCFLAGS=["-O3"])
|
||||
else: # optimize for size
|
||||
env.Prepend(CCFLAGS=["-Os"])
|
||||
|
||||
if env["debug_symbols"] == "yes":
|
||||
if env["debug_symbols"]:
|
||||
env.Prepend(CCFLAGS=["-g2"])
|
||||
|
||||
elif env["target"] == "release_debug":
|
||||
if env["debug_symbols"] != "full":
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Prepend(CCFLAGS=["-O2"])
|
||||
else: # optimize for size
|
||||
env.Prepend(CCFLAGS=["-Os"])
|
||||
if env["optimize"] == "speed": # optimize for speed (default)
|
||||
env.Prepend(CCFLAGS=["-O2"])
|
||||
else: # optimize for size
|
||||
env.Prepend(CCFLAGS=["-Os"])
|
||||
|
||||
env.Prepend(CPPDEFINES=["DEBUG_ENABLED"])
|
||||
|
||||
if env["debug_symbols"] == "yes":
|
||||
if env["debug_symbols"]:
|
||||
env.Prepend(CCFLAGS=["-g2"])
|
||||
|
||||
elif env["target"] == "debug":
|
||||
|
Loading…
Reference in New Issue
Block a user