зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1229233 - Skip building XPIDL when there aren't any in the FasterMake backend. r=gps
The test I'm about to add doesn't have XPIDL files, and that currently avoids the FasterMake backend to run properly. Also, in the future, when the FasterMake grows the ability to build C++ files, it should be possible to build Spidermonkey with the FasterMake backend, but it doesn't have XPIDL files either.
This commit is contained in:
Родитель
23883e6652
Коммит
fc199d9034
|
@ -45,8 +45,10 @@ default: $(addprefix install-,$(INSTALL_MANIFESTS))
|
|||
default: $(addprefix $(TOPOBJDIR)/,$(MANIFEST_TARGETS))
|
||||
default: $(TOPOBJDIR)/dist/bin/platform.ini
|
||||
|
||||
ifndef NO_XPIDL
|
||||
# Targets from the recursive make backend to be built for a default build
|
||||
default: $(TOPOBJDIR)/config/makefiles/xpidl/xpidl
|
||||
endif
|
||||
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
# Mac builds require to copy things in dist/bin/*.app
|
||||
|
|
|
@ -16,6 +16,7 @@ from mozbuild.frontend.data import (
|
|||
JsPreferenceFile,
|
||||
Resources,
|
||||
VariablePassthru,
|
||||
XPIDLFile,
|
||||
)
|
||||
from mozbuild.jar import JarManifestParser
|
||||
from mozbuild.makeutil import Makefile
|
||||
|
@ -42,6 +43,8 @@ class FasterMakeBackend(CommonBackend):
|
|||
|
||||
self._dependencies = OrderedDefaultDict(list)
|
||||
|
||||
self._has_xpidl = False
|
||||
|
||||
def _add_preprocess(self, obj, path, dest, target=None, **kwargs):
|
||||
if target is None:
|
||||
target = mozpath.basename(path)
|
||||
|
@ -168,6 +171,14 @@ class FasterMakeBackend(CommonBackend):
|
|||
self._manifest_entries[top_level].append(entry)
|
||||
self._manifest_entries[obj.path].append(str(obj.entry))
|
||||
|
||||
elif isinstance(obj, XPIDLFile):
|
||||
self._has_xpidl = True
|
||||
# XPIDL are emitted before Defines, which breaks the assert in the
|
||||
# branch for Defines. OTOH, we don't actually care about the
|
||||
# XPIDLFile objects just yet, so we can just pretend we didn't see
|
||||
# an object in the directory yet.
|
||||
return True
|
||||
|
||||
else:
|
||||
# We currently ignore a lot of object types, so just acknowledge
|
||||
# everything.
|
||||
|
@ -286,6 +297,8 @@ class FasterMakeBackend(CommonBackend):
|
|||
mk.add_statement('TOPSRCDIR = %s' % self.environment.topsrcdir)
|
||||
mk.add_statement('TOPOBJDIR = %s' % self.environment.topobjdir)
|
||||
mk.add_statement('BACKEND = %s' % self._backend_output_list_file)
|
||||
if not self._has_xpidl:
|
||||
mk.add_statement('NO_XPIDL = 1')
|
||||
|
||||
# Add a few necessary variables inherited from configure
|
||||
for var in (
|
||||
|
|
Загрузка…
Ссылка в новой задаче