From dcd8e418ac28315f2e2a714b02a12d3f10776d2c Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 4 Feb 2016 13:40:10 +0900 Subject: [PATCH] Bug 1245763 - Group sources and linkables handling function cals in mozbuild.emitter. r=gps --- python/mozbuild/mozbuild/frontend/emitter.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py index d70b8ec8f2a5..aa46ae4689fa 100644 --- a/python/mozbuild/mozbuild/frontend/emitter.py +++ b/python/mozbuild/mozbuild/frontend/emitter.py @@ -371,6 +371,15 @@ class TreeMetadataEmitter(LoggingMixin): else: return ExternalSharedLibrary(context, name) + def _handle_linkables(self, context, passthru): + for obj in self._process_sources(context, passthru): + yield obj + + self._handle_programs(context) + + for obj in self._handle_libraries(context): + yield obj + def _handle_libraries(self, context): host_libname = context.get('HOST_LIBRARY_NAME') libname = context.get('LIBRARY_NAME') @@ -625,9 +634,6 @@ class TreeMetadataEmitter(LoggingMixin): elif dist_install is False: passthru.variables['NO_DIST_INSTALL'] = True - for obj in self._process_sources(context, passthru): - yield obj - generated_files = set() for obj in self._process_generated_files(context): generated_files.add(obj.output) @@ -644,8 +650,6 @@ class TreeMetadataEmitter(LoggingMixin): if host_defines: yield HostDefines(context, host_defines) - self._handle_programs(context) - simple_lists = [ ('GENERATED_EVENTS_WEBIDL_FILES', GeneratedEventWebIDLFile), ('GENERATED_WEBIDL_FILES', GeneratedWebIDLFile), @@ -745,7 +749,7 @@ class TreeMetadataEmitter(LoggingMixin): Manifest('components', mozpath.basename(c))) - for obj in self._handle_libraries(context): + for obj in self._handle_linkables(context, passthru): yield obj for obj in self._process_test_manifests(context):