From afd73a43a7b4b711dfd0d73d8c9160336158e06e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 23 Nov 2025 12:15:53 +0100 Subject: [PATCH] OSX/iOS: Make .dSYM extraction opt-in --- platform/iphone/SCsub | 6 ++++-- platform/iphone/detect.py | 3 ++- platform/osx/SCsub | 2 +- platform/osx/detect.py | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) 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), ]