Bug 1523153 - Pass the altered PATH to old-configure. r=chmanchester

The combination of bug 1515579 and bug 1520394 made things harder for
old-configure, because it doesn't necessarily have a complete view of
the search PATH that has been used. This doesn't actually cause problems
on non-Windows builds because things work out fine, but on Windows,
some of the executions of clang-cl in old-configure insist on being able
to find a MSVC install. That, again, doesn't currently cause problems in
general on local builds because clang-cl finds it through the registry
(presumably), and on automation, because it's in the `mk_add_options
export`'ed PATH, but the latter is due to change.

Depends on D17772

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2019-01-29 01:17:57 +00:00
parent 621fd58bd3
commit d62063e5c2

View File

@ -296,7 +296,7 @@ def prepare_configure_options(extra_old_configure_args, all_options, *options):
return namespace(options=options, extra_env=extra_env, all_options=all_options)
@depends(prepare_configure, prepare_configure_options)
@depends(prepare_configure, prepare_configure_options, altered_path)
@imports(_from='__builtin__', _import='compile')
@imports(_from='__builtin__', _import='open')
@imports('logging')
@ -307,7 +307,7 @@ def prepare_configure_options(extra_old_configure_args, all_options, *options):
@imports(_from='mozbuild.shellutil', _import='quote')
@imports(_from='mozbuild.shellutil', _import='split')
@imports(_from='mozbuild.util', _import='encode')
def old_configure(prepare_configure, prepare_configure_options):
def old_configure(prepare_configure, prepare_configure_options, altered_path):
cmd = prepare_configure + prepare_configure_options.options
extra_env = prepare_configure_options.extra_env
@ -334,6 +334,9 @@ def old_configure(prepare_configure, prepare_configure_options):
log_size = os.path.getsize(config_log.baseFilename)
break
if altered_path:
env['PATH'] = altered_path
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
env=encode(env))
while True: