Bug 1594344 - Part 3: Use new dump_syms in automation. r=froydnj

This optionally uses the rust-based `dump_syms` toolchain if it has been
installed, otherwise it uses the locally built version.

Differential Revision: https://phabricator.services.mozilla.com/D53320

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Eric Rahm 2019-12-13 10:28:13 +00:00
Родитель 3122df4697
Коммит 6c0b70d6d9
1 изменённых файлов: 19 добавлений и 4 удалений

Просмотреть файл

@ -28,10 +28,25 @@ def dump_symbols(target, tracking_file, count_ctors=False):
# Build default args for symbolstore.py based on platform.
sym_store_args = []
dump_syms_bin = os.path.join(buildconfig.topobjdir,
'dist', 'host',
'bin', 'dump_syms')
dump_syms_bin = '%s%s' % (dump_syms_bin, buildconfig.substs['BIN_SUFFIX'])
# Find the `dump_syms` binary to use.
dump_syms_bin = None
dump_syms_binaries = []
# Prefer the `dump_syms` toolchain.
fetches_dir = os.environ.get('MOZ_FETCHES_DIR')
if fetches_dir:
dump_syms_binaries.append(
os.path.join(fetches_dir, 'dump_syms', 'dump_syms'))
# Fallback to the in-tree breakpad version.
dump_syms_binaries.append(os.path.join(buildconfig.topobjdir,
'dist', 'host',
'bin', 'dump_syms'))
for b in dump_syms_binaries:
dump_syms_bin = '%s%s' % (b, buildconfig.substs['BIN_SUFFIX'])
if os.path.exists(dump_syms_bin):
break
os_arch = buildconfig.substs['OS_ARCH']
if os_arch == 'WINNT':