Also search libchromiumcontent download dir for dSYMs.
This commit is contained in:
parent
6393e2e1e5
commit
deef68bcf9
3 changed files with 15 additions and 12 deletions
1
atom.gyp
1
atom.gyp
|
@ -422,6 +422,7 @@
|
|||
'--build-dir=<(PRODUCT_DIR)',
|
||||
'--binary=<(PRODUCT_DIR)/<(product_name).app/Contents/MacOS/<(product_name)',
|
||||
'--symbols-dir=<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
|
||||
'--libchromiumcontent-dir=<(libchromiumcontent_library_dir)',
|
||||
'--clear',
|
||||
'--jobs=16',
|
||||
],
|
||||
|
|
|
@ -164,11 +164,6 @@ def download_libchromiumcontent_symbols(url):
|
|||
'download')
|
||||
subprocess.check_call([sys.executable, download, '-f', '-s', url, target_dir])
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
shutil.copytree(symbols_path,
|
||||
os.path.join(OUT_DIR, symbols_name),
|
||||
symlinks=True)
|
||||
|
||||
|
||||
def create_symbols():
|
||||
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
|
||||
|
|
|
@ -59,19 +59,20 @@ def FindBundlePart(full_path):
|
|||
return ''
|
||||
|
||||
|
||||
def GetDSYMBundle(build_dir, binary_path):
|
||||
def GetDSYMBundle(options, binary_path):
|
||||
"""Finds the .dSYM bundle to the binary."""
|
||||
if binary_path[0] == '/' or binary_path == '':
|
||||
return binary_path
|
||||
|
||||
filename = FindBundlePart(binary_path)
|
||||
search_dirs = [options.build_dir, options.libchromiumcontent_dir]
|
||||
if filename.endswith(('.dylib', '.framework', '.app')):
|
||||
dsym_path = os.path.join(build_dir, filename) + '.dSYM'
|
||||
for directory in search_dirs:
|
||||
dsym_path = os.path.join(directory, filename) + '.dSYM'
|
||||
if os.path.exists(dsym_path):
|
||||
return dsym_path
|
||||
|
||||
if dsym_path != None and os.path.exists(dsym_path):
|
||||
return dsym_path
|
||||
else:
|
||||
return binary_path
|
||||
return binary_path
|
||||
|
||||
|
||||
def Resolve(path, exe_path, loader_path, rpaths):
|
||||
|
@ -176,7 +177,7 @@ def GenerateSymbols(options, binaries):
|
|||
print "Generating symbols for %s" % binary
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
binary = GetDSYMBundle(options.build_dir, binary)
|
||||
binary = GetDSYMBundle(options, binary)
|
||||
|
||||
syms = GetCommandOutput([GetDumpSymsBinary(options.build_dir), '-r', '-c',
|
||||
binary])
|
||||
|
@ -208,6 +209,8 @@ def main():
|
|||
help='The build output directory.')
|
||||
parser.add_option('', '--symbols-dir', default='',
|
||||
help='The directory where to write the symbols file.')
|
||||
parser.add_option('', '--libchromiumcontent-dir', default='',
|
||||
help='The directory where libchromiumcontent is downloaded.')
|
||||
parser.add_option('', '--binary', default='',
|
||||
help='The path of the binary to generate symbols for.')
|
||||
parser.add_option('', '--clear', default=False, action='store_true',
|
||||
|
@ -228,6 +231,10 @@ def main():
|
|||
print "Required option --build-dir missing."
|
||||
return 1
|
||||
|
||||
if not options.libchromiumcontent_dir:
|
||||
print "Required option --libchromiumcontent-dir missing."
|
||||
return 1
|
||||
|
||||
if not options.binary:
|
||||
print "Required option --binary missing."
|
||||
return 1
|
||||
|
|
Loading…
Reference in a new issue