Bug 1063880 - Do not emit Linkable-derived objects when COMPILE_ENVIRONMENT is not set. r=mshal

This commit is contained in:
Mike Hommey 2015-03-10 15:16:08 +09:00
parent 5023968c50
commit 0830d553e8

View File

@ -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)