mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 939039 - Make FINAL_LIBRARY imply FORCE_STATIC_LIB. r=gps
This also moves the LIBXUL_LIBRARY implies FORCE_STATIC_LIB test in the emitter instead of config.mk, since both variables are defined in moz.build exclusively. backend.mk can end up with both LIBXUL_LIBRARY and FORCE_STATIC_LIB defined, but it's just fine.
This commit is contained in:
parent
71b60fe95d
commit
f85ec564e8
@ -339,9 +339,6 @@ endif
|
||||
ifdef MODULE_NAME
|
||||
$(error MODULE_NAME is $(MODULE_NAME) but MODULE_NAME and LIBXUL_LIBRARY are not compatible)
|
||||
endif
|
||||
ifdef FORCE_STATIC_LIB
|
||||
$(error Makefile sets FORCE_STATIC_LIB which was already implied by LIBXUL_LIBRARY)
|
||||
endif
|
||||
FORCE_STATIC_LIB=1
|
||||
ifneq ($(SHORT_LIBNAME),)
|
||||
$(error SHORT_LIBNAME is $(SHORT_LIBNAME) but SHORT_LIBNAME is not compatable with LIBXUL_LIBRARY)
|
||||
|
@ -339,9 +339,6 @@ endif
|
||||
ifdef MODULE_NAME
|
||||
$(error MODULE_NAME is $(MODULE_NAME) but MODULE_NAME and LIBXUL_LIBRARY are not compatible)
|
||||
endif
|
||||
ifdef FORCE_STATIC_LIB
|
||||
$(error Makefile sets FORCE_STATIC_LIB which was already implied by LIBXUL_LIBRARY)
|
||||
endif
|
||||
FORCE_STATIC_LIB=1
|
||||
ifneq ($(SHORT_LIBNAME),)
|
||||
$(error SHORT_LIBNAME is $(SHORT_LIBNAME) but SHORT_LIBNAME is not compatable with LIBXUL_LIBRARY)
|
||||
|
@ -159,6 +159,9 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
'doesn\'t exist in %s (%s) in %s'
|
||||
% (symbol, src, sandbox['RELATIVEDIR']))
|
||||
|
||||
if sandbox.get('LIBXUL_LIBRARY') and sandbox.get('FORCE_STATIC_LIB'):
|
||||
raise SandboxValidationError('LIBXUL_LIBRARY implies FORCE_STATIC_LIB')
|
||||
|
||||
# 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.
|
||||
@ -238,9 +241,6 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
l = passthru.variables.setdefault('GARBAGE', [])
|
||||
l.append(f)
|
||||
|
||||
if passthru.variables:
|
||||
yield passthru
|
||||
|
||||
exports = sandbox.get('EXPORTS')
|
||||
if exports:
|
||||
yield Exports(sandbox, exports,
|
||||
@ -293,7 +293,10 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
if not libname:
|
||||
# For now, this is true.
|
||||
raise SandboxValidationError('FINAL_LIBRARY requires LIBRARY_NAME')
|
||||
if sandbox.get('FORCE_STATIC_LIB'):
|
||||
raise SandboxValidationError('FINAL_LIBRARY implies FORCE_STATIC_LIB')
|
||||
self._final_libs.append((sandbox['RELATIVEDIR'], libname, final_lib))
|
||||
passthru.variables['FORCE_STATIC_LIB'] = True
|
||||
|
||||
# While there are multiple test manifests, the behavior is very similar
|
||||
# across them. We enforce this by having common handling of all
|
||||
@ -333,6 +336,9 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
for name, jar in sandbox.get('JAVA_JAR_TARGETS', {}).items():
|
||||
yield SandboxWrapped(sandbox, jar)
|
||||
|
||||
if passthru.variables:
|
||||
yield passthru
|
||||
|
||||
def _create_substitution(self, cls, sandbox, path):
|
||||
if os.path.isabs(path):
|
||||
path = path[1:]
|
||||
|
@ -42,7 +42,6 @@ MSVC_ENABLE_PGO = True
|
||||
NO_DIST_INSTALL = True
|
||||
|
||||
FORCE_SHARED_LIB = True
|
||||
FORCE_STATIC_LIB = True
|
||||
EXPORT_LIBRARY = True
|
||||
IS_COMPONENT = True
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
|
@ -148,7 +148,6 @@ class TestEmitterBasic(unittest.TestCase):
|
||||
EXTRA_PP_JS_MODULES=['bar.pp.jsm', 'foo.pp.jsm'],
|
||||
FAIL_ON_WARNINGS=True,
|
||||
FORCE_SHARED_LIB=True,
|
||||
FORCE_STATIC_LIB=True,
|
||||
GTEST_CSRCS=['test1.c', 'test2.c'],
|
||||
GTEST_CMMSRCS=['test1.mm', 'test2.mm'],
|
||||
GTEST_CPPSRCS=['test1.cpp', 'test2.cpp'],
|
||||
|
Loading…
Reference in New Issue
Block a user