Bug 1553864 - Clean up some VS2015 PGO build config code r=nalexander
authorDavid Major <dmajor@mozilla.com>
Mon, 03 Jun 2019 20:30:31 +0000
changeset 476673 44b86ef7a1d67ca90b6aa563ec133b70fc91c445
parent 476672 cfeedb5ec50c4cb8e4007ac4a4030bcae8eb0177
child 476674 2d70e6f3a03acd7f10b084949d4708f391174c3d
push id36104
push usercbrindusan@mozilla.com
push dateTue, 04 Jun 2019 03:45:41 +0000
treeherdermozilla-central@38c2478a4825 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1553864
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1553864 - Clean up some VS2015 PGO build config code r=nalexander This code was already dead during the VS2017 era (since that compiler changed to the `Hostx64\x86` path scheme), let alone clang-cl. Differential Revision: https://phabricator.services.mozilla.com/D33513
build/pgo/profileserver.py
toolkit/mozapps/installer/packager.py
--- a/build/pgo/profileserver.py
+++ b/build/pgo/profileserver.py
@@ -3,17 +3,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import json
 import os
 import sys
 
-from buildconfig import substs
 from mozbuild.base import MozbuildObject
 from mozfile import TemporaryDirectory
 from mozhttpd import MozHttpd
 from mozprofile import FirefoxProfile, Preferences
 from mozprofile.permissions import ServerLocations
 from mozrunner import FirefoxRunner, CLI
 from six import string_types
 
@@ -87,27 +86,16 @@ if __name__ == '__main__':
         env["XPCOM_DEBUG_BREAK"] = "warn"
         # We disable sandboxing to make writing profiling data actually work
         # Bug 1553850 considers fixing this.
         env["MOZ_DISABLE_CONTENT_SANDBOX"] = "1"
 
         # Ensure different pids write to different files
         env["LLVM_PROFILE_FILE"] = "default_%p_random_%m.profraw"
 
-        # For VC12+, make sure we can find the right bitness of pgort1x0.dll
-        if not substs.get('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
-
         # Write to an output file if we're running in automation
         process_args = {}
         if 'UPLOAD_PATH' in env:
             process_args['logfile'] = os.path.join(env['UPLOAD_PATH'], 'profile-run-1.log')
 
         # Run Firefox a first time to initialize its profile
         runner = FirefoxRunner(profile=profile,
                                binary=binary,
--- a/toolkit/mozapps/installer/packager.py
+++ b/toolkit/mozapps/installer/packager.py
@@ -77,27 +77,16 @@ class ToolLauncher(object):
         for p in ['LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH']:
             if p in env:
                 env[p] = extra_linker_path + ':' + env[p]
             else:
                 env[p] = extra_linker_path
         for e in extra_env:
             env[e] = extra_env[e]
 
-        # For VC12+, make sure we can find the right bitness of pgort1x0.dll
-        if not buildconfig.substs.get('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.
         for k, v in env.items():
             if isinstance(v, unicode):
                 env[k] = v.encode('utf-8')
 
         print >>errors.out, 'Executing', ' '.join(cmd)
         errors.out.flush()