From c6d9a7665acdd5785760eee0c69bd1d2a53b6b90 Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam Date: Fri, 26 Jan 2018 20:46:56 +0100 Subject: [PATCH] Make separate debug symbols opt-in This adds a separate_debug_symbols option to the x11, windows, and osx targets. This will default to adding normal debugging symbols to the artifacts and only splits them when separate_debug_symbols=yes on the Scons command line. --- platform/osx/SCsub | 2 +- platform/osx/detect.py | 1 + platform/windows/SCsub | 2 +- platform/windows/detect.py | 1 + platform/x11/SCsub | 2 +- platform/x11/detect.py | 1 + 6 files changed, 6 insertions(+), 3 deletions(-) diff --git a/platform/osx/SCsub b/platform/osx/SCsub index 029e3d808c4..07e633a1179 100644 --- a/platform/osx/SCsub +++ b/platform/osx/SCsub @@ -23,6 +23,6 @@ files = [ prog = env.add_program('#bin/godot', files) -if env["debug_symbols"] == "full" or env["debug_symbols"] == "yes": +if (env["debug_symbols"] == "full" or env["debug_symbols"] == "yes") and env["separate_debug_symbols"]: env.AddPostAction(prog, make_debug) diff --git a/platform/osx/detect.py b/platform/osx/detect.py index bb601abd40c..eb31533c0ac 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -24,6 +24,7 @@ def get_opts(): return [ ('osxcross_sdk', 'OSXCross SDK version', 'darwin14'), EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')), + BoolVariable('separate_debug_symbols', 'Create a separate file with the debug symbols', False), ] diff --git a/platform/windows/SCsub b/platform/windows/SCsub index 604896b0dba..8965b80fb72 100644 --- a/platform/windows/SCsub +++ b/platform/windows/SCsub @@ -39,5 +39,5 @@ if env['vsproj']: env.vs_srcs = env.vs_srcs + ["platform/windows/" + str(x)] if not os.getenv("VCINSTALLDIR"): - if env["debug_symbols"] == "full" or env["debug_symbols"] == "yes": + if (env["debug_symbols"] == "full" or env["debug_symbols"] == "yes") and env["separate_debug_symbols"]: env.AddPostAction(prog, make_debug_mingw) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index bd05d5605de..22d04153c82 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -69,6 +69,7 @@ def get_opts(): # Vista support dropped after EOL due to GH-10243 ('target_win_version', 'Targeted Windows version, >= 0x0601 (Windows 7)', '0x0601'), EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')), + BoolVariable('separate_debug_symbols', 'Create a separate file with the debug symbols', False), ] diff --git a/platform/x11/SCsub b/platform/x11/SCsub index 38dd2ddd88d..b18757337a5 100644 --- a/platform/x11/SCsub +++ b/platform/x11/SCsub @@ -19,5 +19,5 @@ common_x11 = [ prog = env.add_program('#bin/godot', ['godot_x11.cpp'] + common_x11) -if env["debug_symbols"] == "full" or env["debug_symbols"] == "yes": +if (env["debug_symbols"] == "full" or env["debug_symbols"] == "yes") and env["separate_debug_symbols"]: env.AddPostAction(prog, make_debug) diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 5c8564376f8..02bd7232c2d 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -55,6 +55,7 @@ def get_opts(): BoolVariable('pulseaudio', 'Detect & use pulseaudio', True), BoolVariable('udev', 'Use udev for gamepad connection callbacks', False), EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')), + BoolVariable('separate_debug_symbols', 'Create a separate file with the debug symbols', False), BoolVariable('touch', 'Enable touch events', True), ]