зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1566219 - Provide dist-toolchains for use with sccache in bootstrap on macOS. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D38151 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
baf6ea8af4
Коммит
c418bfd3d5
|
@ -297,7 +297,8 @@ class BaseBootstrapper(object):
|
|||
os.mkdir(clang_tools_path)
|
||||
self.install_toolchain_artifact(clang_tools_path, checkout_root, toolchain_job)
|
||||
|
||||
def install_toolchain_artifact(self, state_dir, checkout_root, toolchain_job):
|
||||
def install_toolchain_artifact(self, state_dir, checkout_root, toolchain_job,
|
||||
no_unpack=False):
|
||||
mach_binary = os.path.join(checkout_root, 'mach')
|
||||
mach_binary = os.path.abspath(mach_binary)
|
||||
if not os.path.exists(mach_binary):
|
||||
|
@ -312,6 +313,9 @@ class BaseBootstrapper(object):
|
|||
cmd = [sys.executable, mach_binary, 'artifact', 'toolchain',
|
||||
'--from-build', toolchain_job]
|
||||
|
||||
if no_unpack:
|
||||
cmd += ['--no-unpack']
|
||||
|
||||
subprocess.check_call(cmd, cwd=state_dir)
|
||||
|
||||
def which(self, name, *extra_search_dirs):
|
||||
|
|
|
@ -512,6 +512,12 @@ class OSXBootstrapper(BaseBootstrapper):
|
|||
from mozboot import sccache
|
||||
|
||||
self.install_toolchain_artifact(state_dir, checkout_root, sccache.MACOS_SCCACHE)
|
||||
self.install_toolchain_artifact(state_dir, checkout_root,
|
||||
sccache.RUSTC_DIST_TOOLCHAIN,
|
||||
no_unpack=True)
|
||||
self.install_toolchain_artifact(state_dir, checkout_root,
|
||||
sccache.CLANG_DIST_TOOLCHAIN,
|
||||
no_unpack=True)
|
||||
|
||||
def ensure_stylo_packages(self, state_dir, checkout_root):
|
||||
from mozboot import stylo
|
||||
|
|
|
@ -6,3 +6,5 @@ from __future__ import absolute_import, print_function, unicode_literals
|
|||
|
||||
LINUX_SCCACHE = 'linux64-sccache'
|
||||
MACOS_SCCACHE = 'macosx64-sccache'
|
||||
RUSTC_DIST_TOOLCHAIN = 'rustc-dist-toolchain'
|
||||
CLANG_DIST_TOOLCHAIN = 'clang-dist-toolchain'
|
||||
|
|
Загрузка…
Ссылка в новой задаче