Mac: Create a real dSYM that includes file/line info in make_distrib.py.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@415 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-12-09 14:02:32 +00:00
parent 8a1b694797
commit 956073100e
1 changed files with 15 additions and 3 deletions

View File

@ -8,6 +8,8 @@ from gclient_util import *
from optparse import OptionParser from optparse import OptionParser
import os import os
import re import re
import shlex
import subprocess
from svn_util import * from svn_util import *
import sys import sys
import zipfile import zipfile
@ -109,6 +111,14 @@ def fix_msvs_projects():
data = data.replace('../../..\\build\\', '') data = data.replace('../../..\\build\\', '')
write_file(file, data) write_file(file, data)
def run(command_line, working_dir):
""" Run a command. """
sys.stdout.write('-------- Running "'+command_line+'" in "'+\
working_dir+'"...'+"\n")
args = shlex.split(command_line.replace('\\', '\\\\'))
return subprocess.check_call(args, cwd=working_dir, env=os.environ,
shell=(sys.platform == 'win32'))
# cannot be loaded as a module # cannot be loaded as a module
if __name__ != "__main__": if __name__ != "__main__":
sys.stderr.write('This file cannot be loaded as a module!') sys.stderr.write('This file cannot be loaded as a module!')
@ -311,9 +321,11 @@ elif platform == 'macosx':
copy_file(os.path.join(cef_dir, '../xcodebuild/Release/ffmpegsumo.so'), dst_dir, options.quiet) copy_file(os.path.join(cef_dir, '../xcodebuild/Release/ffmpegsumo.so'), dst_dir, options.quiet)
copy_file(os.path.join(cef_dir, '../xcodebuild/Release/libcef.dylib'), dst_dir, options.quiet) copy_file(os.path.join(cef_dir, '../xcodebuild/Release/libcef.dylib'), dst_dir, options.quiet)
# transfer symbols # create the real dSYM file from the "fake" dSYM file
copy_dir(os.path.join(cef_dir, '../xcodebuild/Release/libcef.dylib.dSYM'), \ sys.stdout.write("Creating the real dSYM file...\n")
os.path.join(symbol_dir, 'libcef.dylib.dSYM'), options.quiet) src_path = os.path.join(cef_dir, '../xcodebuild/Release/libcef.dylib.dSYM/Contents/Resources/DWARF/libcef.dylib')
dst_path = os.path.join(symbol_dir, 'libcef.dylib.dSYM')
run('dsymutil '+src_path+' -o '+dst_path, cef_dir)
# transfer resource files # transfer resource files
dst_dir = os.path.join(output_dir, 'Resources') dst_dir = os.path.join(output_dir, 'Resources')