author | Mike Hommey <mh+mozilla@glandium.org> |
Sat, 28 Nov 2015 12:31:54 +0900 | |
changeset 278025 | a9d167756f2fe583fd9dfaf7586095ebc256c4b9 |
parent 278024 | 73e69f3c9ea160d3a18594fd0833f3336e5dbfcf |
child 278026 | 531617914786476f3d180ea787c2b245b299cee4 |
push id | 29841 |
push user | ryanvm@gmail.com |
push date | Sat, 02 Jan 2016 00:29:52 +0000 |
treeherder | mozilla-central@f7fbc524f9f3 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | gps |
bugs | 1235021 |
milestone | 46.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/python/mozbuild/mozbuild/backend/recursivemake.py +++ b/python/mozbuild/mozbuild/backend/recursivemake.py @@ -1237,17 +1237,17 @@ INSTALL_TARGETS += %(prefix)s for lib in obj.linked_system_libs: if obj.KIND == 'target': backend_file.write_once('OS_LIBS += %s\n' % lib) else: backend_file.write_once('HOST_EXTRA_LIBS += %s\n' % lib) # Process library-based defines - self._process_defines(obj.defines, backend_file) + self._process_defines(obj.lib_defines, backend_file) def _process_final_target_files(self, obj, files, backend_file): target = obj.install_target path = mozpath.basedir(target, ( 'dist/bin', 'dist/xpi-stage', '_tests', 'dist/include',
--- a/python/mozbuild/mozbuild/frontend/data.py +++ b/python/mozbuild/mozbuild/frontend/data.py @@ -306,26 +306,26 @@ class ExampleWebIDLInterface(ContextDeri class LinkageWrongKindError(Exception): """Error thrown when trying to link objects of the wrong kind""" class Linkable(ContextDerived): """Generic context derived container object for programs and libraries""" __slots__ = ( - 'defines', + 'lib_defines', 'linked_libraries', 'linked_system_libs', ) def __init__(self, context): ContextDerived.__init__(self, context) self.linked_libraries = [] self.linked_system_libs = [] - self.defines = Defines(context, {}) + self.lib_defines = Defines(context, {}) def link_library(self, obj): assert isinstance(obj, BaseLibrary) if isinstance(obj, SharedLibrary) and obj.variant == obj.COMPONENT: raise LinkageWrongKindError( 'Linkable.link_library() does not take components.') if obj.KIND != self.KIND: raise LinkageWrongKindError('%s != %s' % (obj.KIND, self.KIND))
--- a/python/mozbuild/mozbuild/frontend/emitter.py +++ b/python/mozbuild/mozbuild/frontend/emitter.py @@ -239,27 +239,27 @@ class TreeMetadataEmitter(LoggingMixin): 'or a program, but USE_LIBS contains the following shared ' 'library names:\n %s\n\nMaybe you can remove the ' 'static "%s" library?' % (lib.basename, '\n '.join(shared_libs), lib.basename), contexts[lib.objdir]) # Propagate LIBRARY_DEFINES to all child libraries recursively. def propagate_defines(outerlib, defines): - outerlib.defines.update(defines) + outerlib.lib_defines.update(defines) for lib in outerlib.linked_libraries: # Propagate defines only along FINAL_LIBRARY paths, not USE_LIBS # paths. if (isinstance(lib, StaticLibrary) and lib.link_into == outerlib.basename): propagate_defines(lib, defines) for lib in (l for libs in self._libs.values() for l in libs): if isinstance(lib, Library): - propagate_defines(lib, lib.defines) + propagate_defines(lib, lib.lib_defines) yield lib for obj in self._binaries.values(): yield obj LIBRARY_NAME_VAR = { 'host': 'HOST_LIBRARY_NAME', 'target': 'LIBRARY_NAME', @@ -519,17 +519,17 @@ class TreeMetadataEmitter(LoggingMixin): lib = StaticLibrary(context, libname, **static_args) self._libs[libname].append(lib) self._linkage.append((context, lib, 'USE_LIBS')) if lib_defines: if not libname: raise SandboxValidationError('LIBRARY_DEFINES needs a ' 'LIBRARY_NAME to take effect', context) - lib.defines.update(lib_defines) + lib.lib_defines.update(lib_defines) def emit_from_context(self, context): """Convert a Context to tree metadata objects. This is a generator of mozbuild.frontend.data.ContextDerived instances. """ # We only want to emit an InstallationTarget if one of the consulted
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py +++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py @@ -729,17 +729,17 @@ class TestEmitterBasic(unittest.TestCase expected = { 'liba': '-DIN_LIBA', 'libb': '-DIN_LIBA -DIN_LIBB', 'libc': '-DIN_LIBA -DIN_LIBB', 'libd': '' } defines = {} for lib in libraries: - defines[lib.basename] = ' '.join(lib.defines.get_defines()) + defines[lib.basename] = ' '.join(lib.lib_defines.get_defines()) self.assertEqual(expected, defines) def test_sources(self): """Test that SOURCES works properly.""" reader = self.reader('sources') objs = self.read_topsrcdir(reader) self.assertEqual(len(objs), 6)