From 0830d553e860f77c22c61886511d15ab242d7263 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 10 Mar 2015 15:16:08 +0900 Subject: [PATCH] Bug 1063880 - Do not emit Linkable-derived objects when COMPILE_ENVIRONMENT is not set. r=mshal --- python/mozbuild/mozbuild/frontend/emitter.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py index d3928381ff9..d495218b48b 100644 --- a/python/mozbuild/mozbuild/frontend/emitter.py +++ b/python/mozbuild/mozbuild/frontend/emitter.py @@ -161,11 +161,14 @@ class TreeMetadataEmitter(LoggingMixin): 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)