зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1762050: Use original topobjdir for PGO build virtualenv r=glandium
The PGO-specific objdir is meant for the PGO build artifacts. The python virtualenvs just exist for the host, so there's no need to scope them. Besides, the existing virtualenv infrastructure doesn't know how to distinguish between "main 'build' site" and "PGO 'build' site", which is why it raised this "out-of-date" error. Differential Revision: https://phabricator.services.mozilla.com/D142373
This commit is contained in:
Родитель
87ce1ca8c2
Коммит
4aa5138fd9
|
@ -185,6 +185,7 @@ def build(
|
|||
keep_going=keep_going,
|
||||
mach_context=command_context._mach_context,
|
||||
append_env=append_env,
|
||||
virtualenv_topobjdir=orig_topobjdir,
|
||||
)
|
||||
if status != 0:
|
||||
return status
|
||||
|
@ -208,7 +209,7 @@ def build(
|
|||
)
|
||||
pgo_env["JARLOG_FILE"] = mozpath.join(orig_topobjdir, "jarlog/en-US.log")
|
||||
pgo_cmd = [
|
||||
instr.virtualenv_manager.python_path,
|
||||
command_context.virtualenv_manager.python_path,
|
||||
mozpath.join(command_context.topsrcdir, "build/pgo/profileserver.py"),
|
||||
]
|
||||
subprocess.check_call(pgo_cmd, cwd=instr.topobjdir, env=pgo_env)
|
||||
|
|
|
@ -1222,6 +1222,7 @@ class BuildDriver(MozbuildObject):
|
|||
keep_going=False,
|
||||
mach_context=None,
|
||||
append_env=None,
|
||||
virtualenv_topobjdir=None,
|
||||
):
|
||||
"""Invoke the build backend.
|
||||
|
||||
|
@ -1299,6 +1300,7 @@ class BuildDriver(MozbuildObject):
|
|||
buildstatus_messages=True,
|
||||
line_handler=output.on_line,
|
||||
append_env=append_env,
|
||||
virtualenv_topobjdir=virtualenv_topobjdir,
|
||||
)
|
||||
|
||||
if config_rc != 0:
|
||||
|
@ -1637,6 +1639,7 @@ class BuildDriver(MozbuildObject):
|
|||
buildstatus_messages=False,
|
||||
line_handler=None,
|
||||
append_env=None,
|
||||
virtualenv_topobjdir=None,
|
||||
):
|
||||
# Disable indexing in objdir because it is not necessary and can slow
|
||||
# down builds.
|
||||
|
@ -1660,11 +1663,12 @@ class BuildDriver(MozbuildObject):
|
|||
if eq == "=":
|
||||
append_env[k] = v
|
||||
|
||||
virtualenv_topobjdir = virtualenv_topobjdir or self.topobjdir
|
||||
build_site = CommandSiteManager.from_environment(
|
||||
self.topsrcdir,
|
||||
lambda: get_state_dir(specific_to_topsrcdir=True, topsrcdir=self.topsrcdir),
|
||||
"build",
|
||||
os.path.join(self.topobjdir, "_virtualenvs"),
|
||||
os.path.join(virtualenv_topobjdir, "_virtualenvs"),
|
||||
)
|
||||
build_site.ensure()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче