mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Bug 1251313 - Adjust PATH to find pgort140.dll under Visual Studio 2015; r=ted
32-bit PGO builds need to modify the PATH to find pgortXXX.dll. We were doing this for Visual Studio 2013 (VC12) in 2 locations. We weren't doing it for Visual Studio 2015. This resulted in a failure to launch PGO instrumented executables because pgort140.dll could not be found. This commit refactors the PATH munging to support Visual Studio 2015. MozReview-Commit-ID: 4EKf8gjcNH6 --HG-- extra : rebase_source : 2772558b06202d26583401bc41e56da8c5a69ef4
This commit is contained in:
parent
39be6c9cc8
commit
4f79915537
@ -56,12 +56,16 @@ if __name__ == '__main__':
|
||||
env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
|
||||
env["XPCOM_DEBUG_BREAK"] = "warn"
|
||||
|
||||
# For VC12, make sure we can find the right bitness of pgort120.dll
|
||||
if "VS120COMNTOOLS" in env and not substs["HAVE_64BIT_BUILD"]:
|
||||
vc12dir = os.path.abspath(os.path.join(env["VS120COMNTOOLS"],
|
||||
"../../VC/bin"))
|
||||
if os.path.exists(vc12dir):
|
||||
env["PATH"] = vc12dir + ";" + env["PATH"]
|
||||
# For VC12+, make sure we can find the right bitness of pgort1x0.dll
|
||||
if not substs['HAVE_64BIT_BUILD']:
|
||||
for e in ('VS140COMNTOOLS', 'VS120COMNTOOLS'):
|
||||
if e not in env:
|
||||
continue
|
||||
|
||||
vcdir = os.path.abspath(os.path.join(env[e], '../../VC/bin'))
|
||||
if os.path.exists(vcdir):
|
||||
env['PATH'] = '%s;%s' % (vcdir, env['PATH'])
|
||||
break
|
||||
|
||||
# Run Firefox a first time to initialize its profile
|
||||
runner = FirefoxRunner(profile=profile,
|
||||
|
@ -80,12 +80,16 @@ class ToolLauncher(object):
|
||||
for e in extra_env:
|
||||
env[e] = extra_env[e]
|
||||
|
||||
# For VC12, make sure we can find the right bitness of pgort120.dll
|
||||
if 'VS120COMNTOOLS' in env and not buildconfig.substs['HAVE_64BIT_BUILD']:
|
||||
vc12dir = os.path.abspath(os.path.join(env['VS120COMNTOOLS'],
|
||||
'../../VC/bin'))
|
||||
if os.path.exists(vc12dir):
|
||||
env['PATH'] = vc12dir + ';' + env['PATH']
|
||||
# For VC12+, make sure we can find the right bitness of pgort1x0.dll
|
||||
if not buildconfig.substs['HAVE_64BIT_BUILD']:
|
||||
for e in ('VS140COMNTOOLS', 'VS120COMNTOOLS'):
|
||||
if e not in env:
|
||||
continue
|
||||
|
||||
vcdir = os.path.abspath(os.path.join(env[e], '../../VC/bin'))
|
||||
if os.path.exists(vcdir):
|
||||
env['PATH'] = '%s;%s' % (vcdir, env['PATH'])
|
||||
break
|
||||
|
||||
# Work around a bug in Python 2.7.2 and lower where unicode types in
|
||||
# environment variables aren't handled by subprocess.
|
||||
|
Loading…
x
Reference in New Issue
Block a user