Bug 1319222 - Enable compilation on all directories in the tup backend; r=chmanchester
MozReview-Commit-ID: D5NlgEHVydZ
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -167,32 +167,16 @@ class BackendTupfile(object):
class TupOnly(CommonBackend, PartialBackend):
"""Backend that generates Tupfiles for the tup build system.
"""
def _init(self):
CommonBackend._init(self)
- self._supported_dirs = (
- 'services',
- 'servo',
- 'startupcache',
- 'storage',
- 'taskcluster',
- 'testing',
- 'third_party',
- 'toolkit',
- 'tools',
- 'uriloader',
- 'view',
- 'widget',
- 'xpcom',
- 'xpfe',
- )
self._backend_files = {}
self._cmd = MozbuildObject.from_environment()
self._manifest_entries = OrderedDefaultDict(set)
self._compile_env_gen_files = (
'*.c',
'*.cpp',
'*.h',
'*.inc',
@@ -276,18 +260,17 @@ class TupOnly(CommonBackend, PartialBack
self._process_final_target_pp_files(obj, backend_file)
elif isinstance(obj, JARManifest):
self._consume_jar_manifest(obj)
elif isinstance(obj, PerSourceFlag):
backend_file.per_source_flags[obj.file_name].extend(obj.flags)
elif isinstance(obj, ComputedFlags):
self._process_computed_flags(obj, backend_file)
elif isinstance(obj, (Sources, GeneratedSources)):
- if obj.relobjdir.startswith(self._supported_dirs):
- backend_file.sources[obj.canonical_suffix].extend(obj.files)
+ backend_file.sources[obj.canonical_suffix].extend(obj.files)
elif isinstance(obj, HostSources):
backend_file.host_sources[obj.canonical_suffix].extend(obj.files)
elif isinstance(obj, VariablePassthru):
backend_file.variables = obj.variables
return True
def consume_finished(self):
@@ -451,19 +434,18 @@ class TupOnly(CommonBackend, PartialBack
destdir=mozpath.join(self.environment.topobjdir, obj.install_target, path))
def _process_computed_flags(self, obj, backend_file):
for var, flags in obj.get_flags():
backend_file.local_flags[var] = flags
def _process_unified_sources(self, obj):
backend_file = self._get_backend_file_for(obj)
- if obj.relobjdir.startswith(self._supported_dirs):
- files = [f[0] for f in obj.unified_source_mapping]
- backend_file.sources[obj.canonical_suffix].extend(files)
+ files = [f[0] for f in obj.unified_source_mapping]
+ backend_file.sources[obj.canonical_suffix].extend(files)
def _handle_idl_manager(self, manager):
if self.environment.is_artifact_build:
return
dist_idl_backend_file = self._get_backend_file('dist/idl')
for idl in manager.idls.values():
dist_idl_backend_file.symlink_rule(idl['source'], output_group=self._installed_idls)