[libdwarf] ensure that the dSYM is always updated in the application bundle when the app executable is rewritten

This commit is contained in:
Watson
2015-02-23 11:25:58 +09:00
parent dd1c095720
commit ecc65d5578
2 changed files with 6 additions and 8 deletions

View File

@@ -480,14 +480,13 @@ EOS
end
# Generate dSYM.
dsym_path = config.app_bundle_dsym(platform)
if !File.exist?(dsym_path) or File.mtime(main_exec) > File.mtime(dsym_path)
if any_obj_file_built
dsym_path = config.app_bundle_dsym(platform)
App.info "Create", dsym_path
sh "/usr/bin/dsymutil \"#{main_exec}\" -o \"#{dsym_path}\""
# TODO only in debug mode
dest_path = File.join(app_resources_dir, File.basename(dsym_path))
copy_resource(dsym_path, dest_path)
copy_resource(dsym_path, app_resources_dir)
end
# Strip all symbols. Only in distribution mode.

View File

@@ -498,14 +498,13 @@ EOS
end
# Generate dSYM.
dsym_path = config.app_bundle_dsym(platform)
if !File.exist?(dsym_path) or File.mtime(main_exec) > File.mtime(dsym_path)
if any_obj_file_built
dsym_path = config.app_bundle_dsym(platform)
App.info "Create", relative_path(dsym_path)
sh "/usr/bin/dsymutil \"#{main_exec}\" -o \"#{dsym_path}\""
# TODO only in debug mode
dest_path = File.join(app_resources_dir, File.basename(dsym_path))
copy_resource(dsym_path, dest_path)
copy_resource(dsym_path, app_resources_dir)
end
# Strip all symbols. Only in distribution mode.