Bug 1319222 - Compile the generated IPDL and WebIDL sources in the tup backend; r=chmanchester draft
authorMike Shal <mshal@mozilla.com>
Wed, 22 Nov 2017 16:06:34 -0500
changeset 707634 a390faab307e201b73cce0070f07ba40f15b8ab6
parent 707633 970c31d7d35d491a533991821a9dbccc2e373704
child 707635 c2f57f40a4a4ff329d784abbd4942c7193cc788a
push id92183
push userbmo:mshal@mozilla.com
push dateTue, 05 Dec 2017 16:33:02 +0000
reviewerschmanchester
bugs1319222
milestone59.0a1
Bug 1319222 - Compile the generated IPDL and WebIDL sources in the tup backend; r=chmanchester The filenames that these objects generate are passed into the _handle_* methods instead of with a Sources object, so they need to be added to the BackendTupfile's list of sources separately. MozReview-Commit-ID: GoqhiJ3Ismm
python/mozbuild/mozbuild/backend/tup.py
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -561,16 +561,17 @@ class TupOnly(CommonBackend, PartialBack
 
         backend_file.rule(
             display='IPDL code generation',
             cmd=cmd,
             outputs=outputs,
             extra_outputs=[self._installed_files],
             check_unchanged=True,
         )
+        backend_file.sources['.cpp'].extend(u[0] for u in unified_ipdl_cppsrcs_mapping)
 
     def _handle_webidl_build(self, bindings_dir, unified_source_mapping,
                              webidls, expected_build_output_files,
                              global_define_files):
         backend_file = self._get_backend_file('dom/bindings')
         backend_file.export_shell()
 
         for source in sorted(webidls.all_preprocessed_sources()):
@@ -593,16 +594,21 @@ class TupOnly(CommonBackend, PartialBack
         backend_file.rule(
             display='WebIDL code generation',
             cmd=cmd,
             inputs=webidls.all_non_static_basenames(),
             outputs=outputs,
             extra_outputs=[self._installed_files],
             check_unchanged=True,
         )
+        backend_file.sources['.cpp'].extend(u[0] for u in unified_source_mapping)
+        backend_file.sources['.cpp'].extend(sorted(global_define_files))
+
+        test_backend_file = self._get_backend_file('dom/bindings/test')
+        test_backend_file.sources['.cpp'].extend(sorted('../%sBinding.cpp' % s for s in webidls.all_test_stems()))
 
 
 class TupBackend(HybridBackend(TupOnly, RecursiveMakeBackend)):
     def build(self, config, output, jobs, verbose):
         status = config._run_make(directory=self.environment.topobjdir, target='tup',
                                   line_handler=output.on_line, log=False, print_directory=False,
                                   ensure_exit_code=False, num_jobs=jobs, silent=not verbose)
         return status