Mac: Fix dSYM processing and add debug dSYM in make_distrib.py (issue #1403)

This commit is contained in:
Marshall Greenblatt 2016-09-01 12:21:14 +03:00
parent 9064e30296
commit 1e84e0cfff
2 changed files with 17 additions and 11 deletions

View File

@ -49,12 +49,9 @@ def create_fake_files(platform, version):
files.append(make_fake_file_info(platform, version, 'minimal')) files.append(make_fake_file_info(platform, version, 'minimal'))
files.append(make_fake_file_info(platform, version, 'client')) files.append(make_fake_file_info(platform, version, 'client'))
# Windows platforms create debug symbols. # Windows and OS X platforms create debug and release symbols.
if platform.find('windows') == 0:
files.append(make_fake_file_info(platform, version, 'debug_symbols'))
# Windows and OS X platforms create release symbols.
if platform.find('windows') == 0 or platform.find('macosx') == 0: if platform.find('windows') == 0 or platform.find('macosx') == 0:
files.append(make_fake_file_info(platform, version, 'debug_symbols'))
files.append(make_fake_file_info(platform, version, 'release_symbols')) files.append(make_fake_file_info(platform, version, 'release_symbols'))
return files return files

View File

@ -621,6 +621,16 @@ elif platform == 'macosx':
copy_dir(os.path.join(build_dir, 'cefclient.app/Contents/Frameworks/%s.framework' % framework_name), \ copy_dir(os.path.join(build_dir, 'cefclient.app/Contents/Frameworks/%s.framework' % framework_name), \
os.path.join(dst_dir, '%s.framework' % framework_name), options.quiet) os.path.join(dst_dir, '%s.framework' % framework_name), options.quiet)
if not options.nosymbols
# create the symbol output directory
symbol_output_dir = create_output_dir(output_dir_name + '_debug_symbols', options.outputdir)
# The real dSYM already exists, just copy it to the output directory.
# dSYMs are only generated when is_official_build=true or enable_dsyms=true.
# See //build/config/mac/symbols.gni.
copy_dir(os.path.join(build_dir, '%s.dSYM' % framework_name),
os.path.join(symbol_output_dir, '%s.dSYM' % framework_name), options.quiet)
# transfer Release files # transfer Release files
build_dir = build_dir_release build_dir = build_dir_release
if not options.allowpartial or path_exists(os.path.join(build_dir, 'cefclient.app')): if not options.allowpartial or path_exists(os.path.join(build_dir, 'cefclient.app')):
@ -637,12 +647,11 @@ elif platform == 'macosx':
# create the symbol output directory # create the symbol output directory
symbol_output_dir = create_output_dir(output_dir_name + '_release_symbols', options.outputdir) symbol_output_dir = create_output_dir(output_dir_name + '_release_symbols', options.outputdir)
# create the real dSYM file from the "fake" dSYM file # The real dSYM already exists, just copy it to the output directory.
sys.stdout.write("Creating the real dSYM file...\n") # dSYMs are only generated when is_official_build=true or enable_dsyms=true.
src_path = os.path.join(build_dir, \ # See //build/config/mac/symbols.gni.
'%s.dSYM/Contents/Resources/DWARF/%s' % (framework_name, framework_name)) copy_dir(os.path.join(build_dir, '%s.dSYM' % framework_name),
dst_path = os.path.join(symbol_output_dir, '%s.dSYM' % framework_name) os.path.join(symbol_output_dir, '%s.dSYM' % framework_name), options.quiet)
run('dsymutil "%s" -o "%s"' % (src_path, dst_path), cef_dir)
if mode == 'standard' or mode == 'minimal': if mode == 'standard' or mode == 'minimal':
# transfer include files # transfer include files