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