зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to inbound a=merge on a CLOSED TREE
This commit is contained in:
Коммит
b37de77499
|
@ -0,0 +1 @@
|
|||
PURGECACHES_DIRS = $(DIST)/bin/browser
|
|
@ -179,6 +179,12 @@ endif
|
|||
|
||||
TAR_CREATE_FLAGS = -chf
|
||||
|
||||
#
|
||||
# Personal makefile customizations go in these optional make include files.
|
||||
#
|
||||
MY_CONFIG := $(DEPTH)/config/myconfig.mk
|
||||
MY_RULES := $(DEPTH)/config/myrules.mk
|
||||
|
||||
#
|
||||
# Default command macros; can be overridden in <arch>.mk.
|
||||
#
|
||||
|
@ -290,7 +296,11 @@ endif
|
|||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Include any personal overrides the user might think are needed.
|
||||
#
|
||||
-include $(topsrcdir)/$(MOZ_BUILD_APP)/app-config.mk
|
||||
-include $(MY_CONFIG)
|
||||
|
||||
######################################################################
|
||||
|
||||
|
|
|
@ -1341,6 +1341,23 @@ ifneq (,$(MDDEPEND_FILES))
|
|||
-include $(MDDEPEND_FILES)
|
||||
endif
|
||||
|
||||
#############################################################################
|
||||
|
||||
-include $(topsrcdir)/$(MOZ_BUILD_APP)/app-rules.mk
|
||||
-include $(MY_RULES)
|
||||
|
||||
#
|
||||
# Generate Emacs tags in a file named TAGS if ETAGS was set in $(MY_CONFIG)
|
||||
# or in $(MY_RULES)
|
||||
#
|
||||
ifdef ETAGS
|
||||
ifneq ($(CSRCS)$(CPPSRCS)$(HEADERS),)
|
||||
all:: TAGS
|
||||
TAGS:: $(CSRCS) $(CPPSRCS) $(HEADERS)
|
||||
$(ETAGS) $(CSRCS) $(CPPSRCS) $(HEADERS)
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Install/copy rules
|
||||
#
|
||||
|
@ -1569,6 +1586,15 @@ CHECK_FROZEN_VARIABLES = $(foreach var,$(FREEZE_VARIABLES), \
|
|||
libs export::
|
||||
$(CHECK_FROZEN_VARIABLES)
|
||||
|
||||
PURGECACHES_DIRS ?= $(DIST)/bin
|
||||
|
||||
PURGECACHES_FILES = $(addsuffix /.purgecaches,$(PURGECACHES_DIRS))
|
||||
|
||||
default all:: $(PURGECACHES_FILES)
|
||||
|
||||
$(PURGECACHES_FILES):
|
||||
if test -d $(@D) ; then touch $@ ; fi
|
||||
|
||||
.DEFAULT_GOAL := $(or $(OVERRIDE_DEFAULT_GOAL),default)
|
||||
|
||||
#############################################################################
|
||||
|
|
|
@ -203,60 +203,6 @@ class BuildBackend(LoggingMixin):
|
|||
"""
|
||||
return None
|
||||
|
||||
def _write_purgecaches(self, config):
|
||||
"""Write .purgecaches sentinels.
|
||||
|
||||
The purgecaches mechanism exists to allow the platform to
|
||||
invalidate the XUL cache (which includes some JS) at application
|
||||
startup-time. The application checks for .purgecaches in the
|
||||
application directory, which varies according to
|
||||
--enable-application. There's a further wrinkle on macOS, where
|
||||
the real application directory is part of a Cocoa bundle
|
||||
produced from the regular application directory by the build
|
||||
system. In this case, we write to both locations, since the
|
||||
build system recreates the Cocoa bundle from the contents of the
|
||||
regular application directory and might remove a sentinel
|
||||
created here.
|
||||
"""
|
||||
|
||||
root = mozpath.join(config.topobjdir, 'dist', 'bin')
|
||||
|
||||
app = config.substs['MOZ_BUILD_APP']
|
||||
if app == 'browser':
|
||||
root = mozpath.join(config.topobjdir, 'dist', 'bin', 'browser')
|
||||
|
||||
purgecaches_dirs = [root]
|
||||
if app == 'browser' and 'cocoa' == config.substs['MOZ_WIDGET_TOOLKIT']:
|
||||
bundledir = mozpath.join(config.topobjdir, 'dist',
|
||||
config.substs['MOZ_MACBUNDLE_NAME'],
|
||||
'Contents', 'Resources',
|
||||
'browser')
|
||||
purgecaches_dirs.append(bundledir)
|
||||
|
||||
for dir in purgecaches_dirs:
|
||||
with open(mozpath.join(dir, '.purgecaches'), 'wt') as f:
|
||||
f.write('\n')
|
||||
|
||||
def post_build(self, config, output, jobs, verbose, status):
|
||||
"""Called late during 'mach build' execution, after `build(...)` has finished.
|
||||
|
||||
`status` is the status value returned from `build(...)`.
|
||||
|
||||
In the case where `build` returns `None`, this is called after
|
||||
the default `make` command has completed, with the status of
|
||||
that command.
|
||||
|
||||
This should return the status value from `build(...)`, or the
|
||||
status value of a subprocess, where 0 denotes success and any
|
||||
other value is an error code.
|
||||
|
||||
If an exception is raised, |mach build| will fail with a
|
||||
non-zero exit code.
|
||||
"""
|
||||
self._write_purgecaches(config)
|
||||
|
||||
return status
|
||||
|
||||
@contextmanager
|
||||
def _write_file(self, path=None, fh=None, mode='rU'):
|
||||
"""Context manager to write a file.
|
||||
|
|
|
@ -1078,23 +1078,6 @@ class BuildDriver(MozbuildObject):
|
|||
{'count': len(monitor.warnings_database)},
|
||||
'{count} compiler warnings present.')
|
||||
|
||||
# Try to run the active build backend's post-build step, if possible.
|
||||
try:
|
||||
config = self.config_environment
|
||||
active_backend = config.substs.get('BUILD_BACKENDS', [None])[0]
|
||||
if active_backend:
|
||||
backend_cls = get_backend_class(active_backend)(config)
|
||||
new_status = backend_cls.post_build(self, output, jobs, verbose, status)
|
||||
status = new_status
|
||||
except Exception as ex:
|
||||
self.log(logging.DEBUG, 'post_build', {'ex': ex},
|
||||
"Unable to run active build backend's post-build step; " +
|
||||
"failing the build due to exception: {ex}.")
|
||||
if not status:
|
||||
# If the underlying build provided a failing status, pass
|
||||
# it through; otherwise, fail.
|
||||
status = 1
|
||||
|
||||
monitor.finish(record_usage=status == 0)
|
||||
|
||||
# Print the collected compiler warnings. This is redundant with
|
||||
|
|
Загрузка…
Ссылка в новой задаче