OSX/iOS: Make .dSYM extraction opt-in

This commit is contained in:
Rémi Verschelde 2025-11-23 12:15:53 +01:00 committed by Rémi Verschelde
parent 1ddcab6312
commit afd73a43a7
No known key found for this signature in database
GPG key ID: C3336907360768E1
4 changed files with 8 additions and 5 deletions

View file

@ -33,5 +33,7 @@ obj = env_ios.Object('godot_iphone.cpp')
prog = None
prog = env_ios.add_program('#bin/godot', [obj] + iphone_lib)
if env['separate_debug_symbols']:
action = "$IPHONEPATH/usr/bin/dsymutil " + File(prog)[0].path + " -o " + File(prog)[0].path + ".dSYM"
env.AddPostAction(prog, action)

View file

@ -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),
]

View file

@ -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)

View file

@ -23,7 +23,7 @@ def get_opts():
return [
('osxcross_sdk', 'OSXCross SDK version', 'darwin14'),
('separate_debug_symbols', 'Extract debug symbols in .dSYM archive', False),
]