platform_osx_builders.py 702 B

1234567891011121314151617181920212223
  1. """Functions used to generate source files during build time
  2. All such functions are invoked in a subprocess on Windows to prevent build flakiness.
  3. """
  4. import os
  5. from platform_methods import subprocess_main
  6. def make_debug_osx(target, source, env):
  7. if env["macports_clang"] != "no":
  8. mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local")
  9. mpclangver = env["macports_clang"]
  10. os.system(mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-dsymutil {0} -o {0}.dSYM".format(target[0]))
  11. else:
  12. os.system("dsymutil {0} -o {0}.dSYM".format(target[0]))
  13. os.system("strip -u -r {0}".format(target[0]))
  14. if __name__ == "__main__":
  15. subprocess_main(globals())