SCsub 838 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. import os
  3. Import('env')
  4. def make_debug(target, source, env):
  5. if (env["macports_clang"] != 'no'):
  6. mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local")
  7. mpclangver = env["macports_clang"]
  8. os.system(mpprefix + '/libexec/llvm-' + mpclangver + '/bin/llvm-dsymutil {0} -o {0}.dSYM'.format(target[0]))
  9. else:
  10. os.system('dsymutil {0} -o {0}.dSYM'.format(target[0]))
  11. os.system('strip -u -r {0}'.format(target[0]))
  12. files = [
  13. 'crash_handler_osx.mm',
  14. 'os_osx.mm',
  15. 'godot_main_osx.mm',
  16. 'sem_osx.cpp',
  17. 'dir_access_osx.mm',
  18. 'joypad_osx.cpp',
  19. 'power_osx.cpp',
  20. ]
  21. prog = env.add_program('#bin/godot', files)
  22. if (env["debug_symbols"] == "full" or env["debug_symbols"] == "yes") and env["separate_debug_symbols"]:
  23. env.AddPostAction(prog, make_debug)