зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1249858 - Stop processing IPDL and WebIDL files during artifact builds; r=glandium
We don't process IPDL and WebIDL files during artifact builds. The backend shouldn't need to care about them. Before: 2001 total backend files; 2001 created; 0 updated; 0 unchanged; 0 deleted After: 1945 total backend files; 1945 created; 0 updated; 0 unchanged; 0 deleted After this change, we no longer write any .cpp files to the objdir during config.status for artifact builds. As part of this, we stopped generated webidlsrcs.mk and the build broke because of an unguarded use in a Makefile. After this change, only 102/3366 files in the objdir after `mach configure` are not a) in _virtualenv b) named backend.mk c) named Makefile (~950 each of backend.mk and Makefile). MozReview-Commit-ID: 11AIn1i4x4f --HG-- extra : rebase_source : ac90bb9f6be8b7b986aa0a61b3ccc203a18346a6
This commit is contained in:
Родитель
aac8926faf
Коммит
503851935a
|
@ -2,6 +2,8 @@
|
|||
# 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/.
|
||||
|
||||
ifdef COMPILE_ENVIRONMENT
|
||||
|
||||
include ../webidlsrcs.mk
|
||||
|
||||
# $(test_sources) comes from webidlsrcs.mk.
|
||||
|
@ -12,6 +14,8 @@ CPPSRCS += $(addprefix ../,$(test_sources))
|
|||
# rules.mk and running make with no target in this dir does the right thing.
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
endif
|
||||
|
||||
check::
|
||||
PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
|
||||
$(PLY_INCLUDE) $(srcdir)/../parser/runtests.py
|
||||
|
|
|
@ -212,6 +212,8 @@ class CommonBackend(BuildBackend):
|
|||
topsrcdir=obj.topsrcdir)
|
||||
|
||||
elif isinstance(obj, XPIDLFile):
|
||||
# TODO bug 1240134 tracks not processing XPIDL files during
|
||||
# artifact builds.
|
||||
self._idl_manager.register_idl(obj)
|
||||
|
||||
elif isinstance(obj, ConfigFileSubstitution):
|
||||
|
@ -225,32 +227,64 @@ class CommonBackend(BuildBackend):
|
|||
|
||||
# We should consider aggregating WebIDL types in emitter.py.
|
||||
elif isinstance(obj, WebIDLFile):
|
||||
# WebIDL isn't relevant to artifact builds.
|
||||
if self.environment.is_artifact_build:
|
||||
return True
|
||||
|
||||
self._webidls.sources.add(mozpath.join(obj.srcdir, obj.basename))
|
||||
|
||||
elif isinstance(obj, GeneratedEventWebIDLFile):
|
||||
# WebIDL isn't relevant to artifact builds.
|
||||
if self.environment.is_artifact_build:
|
||||
return True
|
||||
|
||||
self._webidls.generated_events_sources.add(mozpath.join(
|
||||
obj.srcdir, obj.basename))
|
||||
|
||||
elif isinstance(obj, TestWebIDLFile):
|
||||
# WebIDL isn't relevant to artifact builds.
|
||||
if self.environment.is_artifact_build:
|
||||
return True
|
||||
|
||||
self._webidls.test_sources.add(mozpath.join(obj.srcdir,
|
||||
obj.basename))
|
||||
|
||||
elif isinstance(obj, PreprocessedTestWebIDLFile):
|
||||
# WebIDL isn't relevant to artifact builds.
|
||||
if self.environment.is_artifact_build:
|
||||
return True
|
||||
|
||||
self._webidls.preprocessed_test_sources.add(mozpath.join(
|
||||
obj.srcdir, obj.basename))
|
||||
|
||||
elif isinstance(obj, GeneratedWebIDLFile):
|
||||
# WebIDL isn't relevant to artifact builds.
|
||||
if self.environment.is_artifact_build:
|
||||
return True
|
||||
|
||||
self._webidls.generated_sources.add(mozpath.join(obj.srcdir,
|
||||
obj.basename))
|
||||
|
||||
elif isinstance(obj, PreprocessedWebIDLFile):
|
||||
# WebIDL isn't relevant to artifact builds.
|
||||
if self.environment.is_artifact_build:
|
||||
return True
|
||||
|
||||
self._webidls.preprocessed_sources.add(mozpath.join(
|
||||
obj.srcdir, obj.basename))
|
||||
|
||||
elif isinstance(obj, ExampleWebIDLInterface):
|
||||
# WebIDL isn't relevant to artifact builds.
|
||||
if self.environment.is_artifact_build:
|
||||
return True
|
||||
|
||||
self._webidls.example_interfaces.add(obj.name)
|
||||
|
||||
elif isinstance(obj, IPDLFile):
|
||||
# IPDL isn't relevant to artifact builds.
|
||||
if self.environment.is_artifact_build:
|
||||
return True
|
||||
|
||||
self._ipdl_sources.add(mozpath.join(obj.srcdir, obj.basename))
|
||||
|
||||
elif isinstance(obj, UnifiedSources):
|
||||
|
|
Загрузка…
Ссылка в новой задаче