Bug 1604095 - Install fix-stacks in mach bootstrap. r=glandium

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicholas Nethercote 2020-03-05 00:23:40 +00:00
parent 007885daf6
commit 62a87c4bd1
11 changed files with 86 additions and 10 deletions

View File

@ -13,6 +13,7 @@ import glob
from mozboot.base import BaseBootstrapper
from mozboot.linux_common import (
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
NodeInstall,
SccacheInstall,
@ -28,8 +29,14 @@ if sys.version_info < (3,):
class ArchlinuxBootstrapper(
NodeInstall, StyloInstall, SccacheInstall, ClangStaticAnalysisInstall,
LucetcInstall, WasiSysrootInstall, BaseBootstrapper):
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
NodeInstall,
SccacheInstall,
StyloInstall,
WasiSysrootInstall,
BaseBootstrapper):
'''Archlinux experimental bootstrapper.'''
SYSTEM_PACKAGES = [

View File

@ -318,6 +318,12 @@ class BaseBootstrapper(object):
'''
pass
def ensure_fix_stacks_packages(self, state_dir, checkout_root):
'''
Install fix-stacks.
'''
pass
def install_toolchain_static_analysis(self, state_dir, checkout_root, toolchain_job):
clang_tools_path = os.path.join(state_dir, 'clang-tools')
if not os.path.exists(clang_tools_path):

View File

@ -386,6 +386,7 @@ class Bootstrapper(object):
self.instance.ensure_lucetc_packages(state_dir, checkout_root)
self.instance.ensure_wasi_sysroot_packages(state_dir, checkout_root)
self.instance.ensure_dump_syms_packages(state_dir, checkout_root)
self.instance.ensure_fix_stacks_packages(state_dir, checkout_root)
def check_telemetry_opt_in(self, state_dir):
# We can't prompt the user.

View File

@ -9,6 +9,7 @@ import platform
from mozboot.base import BaseBootstrapper
from mozboot.linux_common import (
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
NasmInstall,
NodeInstall,
@ -19,9 +20,16 @@ from mozboot.linux_common import (
class CentOSFedoraBootstrapper(
NasmInstall, NodeInstall, StyloInstall, SccacheInstall,
ClangStaticAnalysisInstall, LucetcInstall, WasiSysrootInstall,
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
NasmInstall,
NodeInstall,
SccacheInstall,
StyloInstall,
WasiSysrootInstall,
BaseBootstrapper):
def __init__(self, distro, version, dist_id, **kwargs):
BaseBootstrapper.__init__(self, **kwargs)

View File

@ -7,6 +7,7 @@ from __future__ import absolute_import, print_function, unicode_literals
from mozboot.base import BaseBootstrapper
from mozboot.linux_common import (
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
NasmInstall,
NodeInstall,
@ -34,8 +35,16 @@ Your choice: '''
class DebianBootstrapper(
NasmInstall, NodeInstall, StyloInstall, ClangStaticAnalysisInstall,
SccacheInstall, LucetcInstall, WasiSysrootInstall, BaseBootstrapper):
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
NasmInstall,
NodeInstall,
SccacheInstall,
StyloInstall,
WasiSysrootInstall,
BaseBootstrapper):
# These are common packages for all Debian-derived distros (such as
# Ubuntu).
COMMON_PACKAGES = [

View File

@ -0,0 +1,9 @@
# 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/.
from __future__ import absolute_import, print_function, unicode_literals
LINUX_FIX_STACKS = 'linux64-fix-stacks'
MACOS_FIX_STACKS = 'macosx64-fix-stacks'
WINDOWS_FIX_STACKS = 'win32-fix-stacks'

View File

@ -7,6 +7,7 @@ from __future__ import absolute_import, print_function, unicode_literals
from mozboot.base import BaseBootstrapper
from mozboot.linux_common import (
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
NasmInstall,
NodeInstall,
@ -25,8 +26,15 @@ import subprocess
class GentooBootstrapper(
NasmInstall, NodeInstall, StyloInstall, ClangStaticAnalysisInstall,
SccacheInstall, LucetcInstall, WasiSysrootInstall, BaseBootstrapper):
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
NasmInstall,
NodeInstall,
SccacheInstall,
StyloInstall,
WasiSysrootInstall,
BaseBootstrapper):
def __init__(self, version, dist_id, **kwargs):
BaseBootstrapper.__init__(self, **kwargs)

View File

@ -25,6 +25,17 @@ class SccacheInstall(object):
self.install_toolchain_artifact(state_dir, checkout_root, sccache.LINUX_SCCACHE)
class FixStacksInstall(object):
def __init__(self, **kwargs):
pass
def ensure_fix_stacks_packages(self, state_dir, checkout_root):
from mozboot import fix_stacks
self.install_toolchain_artifact(state_dir, checkout_root,
fix_stacks.LINUX_FIX_STACKS)
class LucetcInstall(object):
def __init__(self, **kwargs):
pass

View File

@ -141,6 +141,11 @@ class MozillaBuildBootstrapper(BaseBootstrapper):
self.install_toolchain_artifact(state_dir, checkout_root, dump_syms.WIN64_DUMP_SYMS)
def ensure_fix_stacks_packages(self, state_dir, checkout_root):
from mozboot import fix_stacks
self.install_toolchain_artifact(state_dir, checkout_root, fix_stacks.WINDOWS_FIX_STACKS)
def _update_package_manager(self):
pass

View File

@ -541,6 +541,11 @@ class OSXBootstrapper(BaseBootstrapper):
sccache.CLANG_DIST_TOOLCHAIN,
no_unpack=True)
def ensure_fix_stacks_packages(self, state_dir, checkout_root):
from mozboot import fix_stacks
self.install_toolchain_artifact(state_dir, checkout_root, fix_stacks.MACOS_FIX_STACKS)
def ensure_stylo_packages(self, state_dir, checkout_root):
from mozboot import stylo
self.install_toolchain_artifact(state_dir, checkout_root, stylo.MACOS_CLANG)

View File

@ -10,6 +10,7 @@ import subprocess
from mozboot.base import BaseBootstrapper
from mozboot.linux_common import (
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
NodeInstall,
SccacheInstall,
@ -25,8 +26,14 @@ if sys.version_info < (3,):
class SolusBootstrapper(
NodeInstall, StyloInstall, SccacheInstall, ClangStaticAnalysisInstall,
LucetcInstall, WasiSysrootInstall, BaseBootstrapper):
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
NodeInstall,
SccacheInstall,
StyloInstall,
WasiSysrootInstall,
BaseBootstrapper):
'''Solus experimental bootstrapper.'''
SYSTEM_PACKAGES = [