diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub index ee2cca61070..24d37a10bef 100644 --- a/platform/iphone/SCsub +++ b/platform/iphone/SCsub @@ -33,5 +33,7 @@ obj = env_ios.Object('godot_iphone.cpp') prog = None prog = env_ios.add_program('#bin/godot', [obj] + iphone_lib) -action = "$IPHONEPATH/usr/bin/dsymutil " + File(prog)[0].path + " -o " + File(prog)[0].path + ".dSYM" -env.AddPostAction(prog, action) + +if env['separate_debug_symbols']: + action = "$IPHONEPATH/usr/bin/dsymutil " + File(prog)[0].path + " -o " + File(prog)[0].path + ".dSYM" + env.AddPostAction(prog, action) diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 9256ef12652..fb85a8d1dc8 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -32,7 +32,8 @@ def get_opts(): ('ios_exceptions', 'Enable exceptions', 'no'), ('ios_triple', 'Triple for ios toolchain', ''), ('ios_sim', 'Build simulator binary', 'no'), - ('use_lto', 'Use link time optimization', 'no') + ('use_lto', 'Use link time optimization', 'no'), + ('separate_debug_symbols', 'Extract debug symbols in .dSYM archive', False), ] diff --git a/platform/osx/SCsub b/platform/osx/SCsub index 7cad5ac772e..76517b147bc 100644 --- a/platform/osx/SCsub +++ b/platform/osx/SCsub @@ -15,7 +15,7 @@ files = [ prog = env.add_program('#bin/godot', files) -if (env['target'] == "debug" or env['target'] == "release_debug"): +if env['separate_debug_symbols'] and (env['target'] == "debug" or env['target'] == "release_debug"): # Build the .dSYM file for atos action = "dsymutil " + File(prog)[0].path + " -o " + File(prog)[0].path + ".dSYM" env.AddPostAction(prog, action) diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 20d313809e8..858f4664eac 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -23,7 +23,7 @@ def get_opts(): return [ ('osxcross_sdk', 'OSXCross SDK version', 'darwin14'), - + ('separate_debug_symbols', 'Extract debug symbols in .dSYM archive', False), ]