mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1155816 - part 2 - move EXTRA_*COMPONENTS manifest check to build-backend time; r=mshal
Now that moz.build can see EXTRA_*COMPONENTS and NO_JS_MANIFEST, we can move some logic from rules.mk (executed every build) to moz.build's emitter.py (executed only at build-backend time).
This commit is contained in:
parent
cbc082742a
commit
206784f8f3
@ -1170,14 +1170,6 @@ endif #} XPT_NAME
|
||||
|
||||
################################################################################
|
||||
# Copy each element of EXTRA_COMPONENTS to $(FINAL_TARGET)/components
|
||||
ifneq (,$(filter %.js,$(EXTRA_COMPONENTS) $(EXTRA_PP_COMPONENTS)))
|
||||
ifeq (,$(filter %.manifest,$(EXTRA_COMPONENTS) $(EXTRA_PP_COMPONENTS)))
|
||||
ifndef NO_JS_MANIFEST
|
||||
$(error .js component without matching .manifest. See https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef EXTRA_COMPONENTS
|
||||
misc:: $(EXTRA_COMPONENTS)
|
||||
ifndef NO_DIST_INSTALL
|
||||
|
@ -526,6 +526,17 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
for obj in self._process_xpidl(context):
|
||||
yield obj
|
||||
|
||||
# Check for manifest declarations in EXTRA_{PP_,}COMPONENTS.
|
||||
extras = context.get('EXTRA_COMPONENTS', []) + context.get('EXTRA_PP_COMPONENTS', [])
|
||||
if any(e.endswith('.js') for e in extras) and \
|
||||
not any(e.endswith('.manifest') for e in extras) and \
|
||||
not context.get('NO_JS_MANIFEST', False):
|
||||
raise SandboxValidationError('A .js component was specified in EXTRA_COMPONENTS '
|
||||
'or EXTRA_PP_COMPONENTS without a matching '
|
||||
'.manifest file. See '
|
||||
'https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0 .',
|
||||
context);
|
||||
|
||||
# Proxy some variables as-is until we have richer classes to represent
|
||||
# them. We should aim to keep this set small because it violates the
|
||||
# desired abstraction of the build definition away from makefiles.
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
EXTRA_COMPONENTS = ['bar.js', 'foo.js']
|
||||
EXTRA_COMPONENTS = ['bar.js', 'dummy.manifest', 'foo.js']
|
||||
EXTRA_PP_COMPONENTS = ['bar.pp.js', 'foo.pp.js']
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -265,6 +265,7 @@ class TestRecursiveMakeBackend(BackendTester):
|
||||
],
|
||||
'EXTRA_COMPONENTS': [
|
||||
'EXTRA_COMPONENTS += bar.js',
|
||||
'EXTRA_COMPONENTS += dummy.manifest',
|
||||
'EXTRA_COMPONENTS += foo.js',
|
||||
],
|
||||
'EXTRA_PP_COMPONENTS': [
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
EXTRA_COMPONENTS=['fans.js', 'tans.js']
|
||||
EXTRA_COMPONENTS = ['dummy.manifest', 'fans.js', 'tans.js']
|
||||
EXTRA_PP_COMPONENTS=['fans.pp.js', 'tans.pp.js']
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -160,7 +160,7 @@ class TestEmitterBasic(unittest.TestCase):
|
||||
|
||||
wanted = {
|
||||
'DISABLE_STL_WRAPPING': True,
|
||||
'EXTRA_COMPONENTS': ['fans.js', 'tans.js'],
|
||||
'EXTRA_COMPONENTS': ['dummy.manifest', 'fans.js', 'tans.js'],
|
||||
'EXTRA_PP_COMPONENTS': ['fans.pp.js', 'tans.pp.js'],
|
||||
'FAIL_ON_WARNINGS': True,
|
||||
'MSVC_ENABLE_PGO': True,
|
||||
|
Loading…
Reference in New Issue
Block a user