summaryrefslogtreecommitdiff
path: root/platform/osx/SCsub
diff options
context:
space:
mode:
Diffstat (limited to 'platform/osx/SCsub')
-rw-r--r--platform/osx/SCsub13
1 files changed, 8 insertions, 5 deletions
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
index 5b2de54535..27bffbe80e 100644
--- a/platform/osx/SCsub
+++ b/platform/osx/SCsub
@@ -1,7 +1,11 @@
#!/usr/bin/env python
+import os
Import('env')
+def make_debug(target, source, env):
+ os.system('dsymutil %s -o %s.dSYM' % (target[0], target[0]))
+
files = [
'crash_handler_osx.mm',
'os_osx.mm',
@@ -13,8 +17,7 @@ files = [
'power_osx.cpp',
]
-prog = env.Program('#bin/godot', files)
-if (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)
+binary = env.Program('#bin/godot', files)
+if env["debug_symbols"] == "full" or env["debug_symbols"] == "yes":
+ env.AddPostAction(binary, make_debug)
+