Bug 1063880 - Do not emit Linkable-derived objects when COMPILE_ENVIRONMENT is not set. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 10 Mar 2015 15:16:08 +0900
changeset 232998 84f6168fbf032e9207de3a918c1fbbe79b8ea7f6
parent 232997 80555e0558a36842b4aee1ccbcfe59d7d84981c9
child 232999 98d0c08747c1e002741b48002f11ee82aa124e55
push id28399
push userryanvm@gmail.com
push dateWed, 11 Mar 2015 19:47:52 +0000
treeherdermozilla-central@30916c9ca768 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1063880
milestone39.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
Bug 1063880 - Do not emit Linkable-derived objects when COMPILE_ENVIRONMENT is not set. r=mshal
python/mozbuild/mozbuild/frontend/emitter.py
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -156,21 +156,24 @@ class TreeMetadataEmitter(LoggingMixin):
 
                 # Update the stats.
                 file_count += len(out.all_paths)
                 sandbox_execution_time += out.execution_time
 
             else:
                 raise Exception('Unhandled output type: %s' % type(out))
 
-        start = time.time()
-        objs = list(self._emit_libs_derived(contexts))
-        emitter_time += time.time() - start
+        # Don't emit Linkable objects when COMPILE_ENVIRONMENT is explicitely
+        # set to a value meaning false (usually '').
+        if self.config.substs.get('COMPILE_ENVIRONMENT', True):
+            start = time.time()
+            objs = list(self._emit_libs_derived(contexts))
+            emitter_time += time.time() - start
 
-        for o in emit_objs(objs): yield o
+            for o in emit_objs(objs): yield o
 
         yield ReaderSummary(file_count, sandbox_execution_time, emitter_time)
 
     def _emit_libs_derived(self, contexts):
         # First do FINAL_LIBRARY linkage.
         for lib in (l for libs in self._libs.values() for l in libs):
             if not isinstance(lib, StaticLibrary) or not lib.link_into:
                 continue