From 23996de41f3b70eee9a058cabd76ee64369f3ffc Mon Sep 17 00:00:00 2001 From: Ignacio Piantanida Date: Sat, 28 Jun 2014 00:21:08 -0300 Subject: [PATCH] Add option to skip dsym generation Creating the .dsym file currently add 15 seconds to the build time of one of my projects. Given that I don't always need symbols information, it seems unnecessary to always generate this file. --- lib/motion/project/builder.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index b8fef0d3..a852f941 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -485,10 +485,12 @@ def build(config, platform, opts) end # Generate dSYM. - dsym_path = config.app_bundle_dsym(platform) - if !File.exist?(dsym_path) or File.mtime(main_exec) > File.mtime(dsym_path) - App.info "Create", dsym_path - sh "/usr/bin/dsymutil \"#{main_exec}\" -o \"#{dsym_path}\"" + unless ENV["skip_dsym"] + dsym_path = config.app_bundle_dsym(platform) + if !File.exist?(dsym_path) or File.mtime(main_exec) > File.mtime(dsym_path) + App.info "Create", dsym_path + sh "/usr/bin/dsymutil \"#{main_exec}\" -o \"#{dsym_path}\"" + end end # Strip all symbols. Only in distribution mode.