Bug 1635834 - Install minidump_stackwalk in 'mach bootstrap'; r=nalexander

Install minidump_stackwalk as part of 'mach bootstrap' so that it is readily available
for generating crash reports, if desired.

Differential Revision: https://phabricator.services.mozilla.com/D74442
This commit is contained in:
Geoff Brown 2020-05-08 19:09:43 +00:00
parent 6b2ccb034a
commit 1c32970a45
11 changed files with 49 additions and 0 deletions

View File

@ -15,6 +15,7 @@ from mozboot.linux_common import (
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
MinidumpStackwalkInstall,
NodeInstall,
SccacheInstall,
StyloInstall,
@ -32,6 +33,7 @@ class ArchlinuxBootstrapper(
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
MinidumpStackwalkInstall,
NodeInstall,
SccacheInstall,
StyloInstall,

View File

@ -324,6 +324,12 @@ class BaseBootstrapper(object):
'''
pass
def ensure_minidump_stackwalk_packages(self, state_dir, checkout_root):
'''
Install minidump_stackwalk.
'''
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

@ -390,6 +390,7 @@ class Bootstrapper(object):
self.instance.state_dir = state_dir
self.instance.ensure_node_packages(state_dir, checkout_root)
self.instance.ensure_fix_stacks_packages(state_dir, checkout_root)
self.instance.ensure_minidump_stackwalk_packages(state_dir, checkout_root)
if not self.instance.artifact_mode:
self.instance.ensure_stylo_packages(state_dir, checkout_root)
self.instance.ensure_clang_static_analysis_package(state_dir, checkout_root)

View File

@ -11,6 +11,7 @@ from mozboot.linux_common import (
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
MinidumpStackwalkInstall,
NasmInstall,
NodeInstall,
SccacheInstall,
@ -23,6 +24,7 @@ class CentOSFedoraBootstrapper(
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
MinidumpStackwalkInstall,
NasmInstall,
NodeInstall,
SccacheInstall,

View File

@ -9,6 +9,7 @@ from mozboot.linux_common import (
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
MinidumpStackwalkInstall,
NasmInstall,
NodeInstall,
SccacheInstall,
@ -38,6 +39,7 @@ class DebianBootstrapper(
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
MinidumpStackwalkInstall,
NasmInstall,
NodeInstall,
SccacheInstall,

View File

@ -9,6 +9,7 @@ from mozboot.linux_common import (
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
MinidumpStackwalkInstall,
NasmInstall,
NodeInstall,
SccacheInstall,
@ -21,6 +22,7 @@ class GentooBootstrapper(
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
MinidumpStackwalkInstall,
NasmInstall,
NodeInstall,
SccacheInstall,

View File

@ -115,3 +115,14 @@ class ClangStaticAnalysisInstall(object):
from mozboot import static_analysis
self.install_toolchain_static_analysis(
state_dir, checkout_root, static_analysis.LINUX_CLANG_TIDY)
class MinidumpStackwalkInstall(object):
def __init__(self, **kwargs):
pass
def ensure_minidump_stackwalk_packages(self, state_dir, checkout_root):
from mozboot import minidump_stackwalk
self.install_toolchain_artifact(state_dir, checkout_root,
minidump_stackwalk.LINUX_MINIDUMP_STACKWALK)

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_MINIDUMP_STACKWALK = 'linux64-minidump-stackwalk'
MACOS_MINIDUMP_STACKWALK = 'macosx64-minidump-stackwalk'
WINDOWS_MINIDUMP_STACKWALK = 'win32-minidump-stackwalk'

View File

@ -149,6 +149,12 @@ class MozillaBuildBootstrapper(BaseBootstrapper):
self.install_toolchain_artifact(state_dir, checkout_root, fix_stacks.WINDOWS_FIX_STACKS)
def ensure_minidump_stackwalk_packages(self, state_dir, checkout_root):
from mozboot import minidump_stackwalk
self.install_toolchain_artifact(state_dir, checkout_root,
minidump_stackwalk.WINDOWS_MINIDUMP_STACKWALK)
def _update_package_manager(self):
pass

View File

@ -561,6 +561,12 @@ class OSXBootstrapper(BaseBootstrapper):
from mozboot import node
self.install_toolchain_artifact(state_dir, checkout_root, node.OSX)
def ensure_minidump_stackwalk_packages(self, state_dir, checkout_root):
from mozboot import minidump_stackwalk
self.install_toolchain_artifact(state_dir, checkout_root,
minidump_stackwalk.MACOS_MINIDUMP_STACKWALK)
def install_homebrew(self):
print(PACKAGE_MANAGER_INSTALL % ('Homebrew', 'Homebrew', 'Homebrew', 'brew'))
bootstrap = urlopen(url=HOMEBREW_BOOTSTRAP, timeout=20).read()

View File

@ -12,6 +12,7 @@ from mozboot.linux_common import (
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
MinidumpStackwalkInstall,
NodeInstall,
SccacheInstall,
StyloInstall,
@ -29,6 +30,7 @@ class SolusBootstrapper(
ClangStaticAnalysisInstall,
FixStacksInstall,
LucetcInstall,
MinidumpStackwalkInstall,
NodeInstall,
SccacheInstall,
StyloInstall,