# HG changeset patch # User Mike Hommey # Date 1548747492 0 # Node ID 52e639ef67df49dd40eaa85b93d9bba009df276b # Parent 19753ddc56853091d8ab945d57578965a293340b Bug 1523204 - Automatically add WIN_DIA_SDK_BIN_DIR to PATH when running dump_syms. r=chmanchester We can't run dump_syms without the DIA SDK binary directory in $PATH because dump_syms requires the DIA dll from there. Obviously, the corresponding test can't run if the DIA SDK binary directory is not known (rather than when the dia2.h header is not found, since the build system currently relies on WIN_DIA_SDK_BIN_DIR being given manually). Differential Revision: https://phabricator.services.mozilla.com/D17892 diff --git a/python/mozbuild/mozbuild/action/dumpsymbols.py b/python/mozbuild/mozbuild/action/dumpsymbols.py --- a/python/mozbuild/mozbuild/action/dumpsymbols.py +++ b/python/mozbuild/mozbuild/action/dumpsymbols.py @@ -32,16 +32,18 @@ def dump_symbols(target, tracking_file): 'bin', 'dump_syms') dump_syms_bin = '%s%s' % (dump_syms_bin, buildconfig.substs['BIN_SUFFIX']) os_arch = buildconfig.substs['OS_ARCH'] if os_arch == 'WINNT': sym_store_args.extend(['-c', '--vcs-info']) if os.environ.get('PDBSTR_PATH'): sym_store_args.append('-i') + os.environ['PATH'] = os.pathsep.join((buildconfig.substs['WIN_DIA_SDK_BIN_DIR'], + os.environ['PATH'])) elif os_arch == 'Darwin': cpu = { 'x86': 'i386', }.get(buildconfig.substs['TARGET_CPU'], buildconfig.substs['TARGET_CPU']) sym_store_args.extend(['-c', '-a', cpu, '--vcs-info']) elif os_arch == 'Linux': sym_store_args.extend(['-c', '--vcs-info']) diff --git a/toolkit/crashreporter/tools/unit-symbolstore.py b/toolkit/crashreporter/tools/unit-symbolstore.py --- a/toolkit/crashreporter/tools/unit-symbolstore.py +++ b/toolkit/crashreporter/tools/unit-symbolstore.py @@ -452,17 +452,17 @@ class TestFunctional(HelperMixin, unitte self.skip_test = False if buildconfig.substs['MOZ_BUILD_APP'] != 'browser': self.skip_test = True self.topsrcdir = buildconfig.topsrcdir self.script_path = os.path.join(self.topsrcdir, 'toolkit', 'crashreporter', 'tools', 'symbolstore.py') if target_platform() == 'WINNT': - if buildconfig.substs['MSVC_HAS_DIA_SDK']: + if buildconfig.substs['WIN_DIA_SDK_BIN_DIR']: self.dump_syms = os.path.join(buildconfig.topobjdir, 'dist', 'host', 'bin', 'dump_syms.exe') else: self.dump_syms = os.path.join(self.topsrcdir, 'toolkit', 'crashreporter', 'tools',