Bug 1456603 - Enable check_unchanged=True for more rules in the tup backend; r=chmanchester
authorMike Shal <mshal@mozilla.com>
Tue, 08 May 2018 16:41:00 -0400
changeset 417544 c99ba2e8d1661fff91ed6e32ef15bcb5e5767e0a
parent 417543 508d0fad4bb0bdad3c4225f7269b895a478e68c3
child 417545 2d5c99b70e34caf443a36b8442b6cd0013355845
push id33970
push usercsabou@mozilla.com
push dateWed, 09 May 2018 17:26:50 +0000
treeherdermozilla-central@d4d7e793ebe8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1456603
milestone62.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 1456603 - Enable check_unchanged=True for more rules in the tup backend; r=chmanchester Enabling this flag on rules that produce many small outputs (especially header files that may trigger many other rules) can help reduce incremental build time. It probably doesn't make sense to have this enabled for .o files and linker rules, because those are less likely to be unchanged when an input file changes, and are also larger so the time to diff them can be more significant. MozReview-Commit-ID: BbJaMCqPU6z
python/mozbuild/mozbuild/backend/tup.py
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -654,16 +654,17 @@ class TupBackend(CommonBackend):
                 full_inputs += [self._early_generated_files]
 
             backend_file.rule(
                 display='python {script}:{method} -> [%o]'.format(script=obj.script, method=obj.method),
                 cmd=cmd,
                 inputs=full_inputs,
                 outputs=outputs,
                 extra_outputs=extra_outputs,
+                check_unchanged=True,
             )
 
     def _process_defines(self, backend_file, obj, host=False):
         defines = list(obj.get_defines())
         if defines:
             if host:
                 backend_file.host_defines = defines
             else:
@@ -814,31 +815,33 @@ class TupBackend(CommonBackend):
                     '$(MOZ_OBJ_ROOT)/xpcom/idl-parser/xpidl/xpidllex.py',
                     '$(MOZ_OBJ_ROOT)/xpcom/idl-parser/xpidl/xpidlyacc.py',
                     self._installed_idls,
                 ],
                 display='XPIDL %s' % module,
                 cmd=cmd,
                 outputs=outputs,
                 extra_outputs=[self._installed_files],
+                check_unchanged=True,
             )
 
         cpp_backend_file = self._get_backend_file('xpcom/reflect/xptinfo')
         cpp_backend_file.export_shell()
         cpp_backend_file.rule(
             inputs=all_xpts,
             display='XPIDL xptcodegen.py %o',
             cmd=[
                 '$(PYTHON_PATH)',
                 '$(PLY_INCLUDE)',
                 '$(topsrcdir)/xpcom/reflect/xptinfo/xptcodegen.py',
                 '%o',
                 '%f',
             ],
             outputs=['xptdata.cpp'],
+            check_unchanged=True,
         )
 
     def _preprocess(self, backend_file, input_file, destdir=None, target=None):
         if target is None:
             target = mozpath.basename(input_file)
         # .css files use '%' as the preprocessor marker, which must be scaped as
         # '%%' in the Tupfile.
         marker = '%%' if target.endswith('.css') else '#'
@@ -853,16 +856,17 @@ class TupBackend(CommonBackend):
         output = mozpath.join(destdir, base_input) if destdir else base_input
 
         backend_file.rule(
             inputs=[input_file],
             extra_inputs=[self._early_generated_files],
             display='Preprocess %o',
             cmd=cmd,
             outputs=[output],
+            check_unchanged=True,
         )
 
     def _handle_ipdl_sources(self, ipdl_dir, sorted_ipdl_sources, sorted_nonstatic_ipdl_sources,
                              sorted_static_ipdl_sources, unified_ipdl_cppsrcs_mapping):
         # Preferably we wouldn't have to import ipdl, but we need to parse the
         # ast in order to determine the namespaces since they are used in the
         # header output paths.
         sys.path.append(mozpath.join(self.environment.topsrcdir, 'ipc', 'ipdl'))