Bug 1372381 - Temporarily skip certain problematic binaries in the Tup backend. r=mshal
☠☠ backed out by 8ba36d8d9923 ☠ ☠
authorChris Manchester <cmanchester@mozilla.com>
Mon, 30 Apr 2018 11:10:21 -0700
changeset 472464 92a96d6b599b585b17cca57186f4d507ba3cc098
parent 472463 620bdfafd42fdd118b14affc2299bff60bfba719
child 472465 4e0f7fe818d0167e4cc0c5a548dc0959fe46fd93
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1372381
milestone61.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 1372381 - Temporarily skip certain problematic binaries in the Tup backend. r=mshal MozReview-Commit-ID: 7lopI8UQPSZ
python/mozbuild/mozbuild/backend/tup.py
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -77,32 +77,45 @@ class BackendTupfile(object):
         self.sources = defaultdict(list)
         self.host_sources = defaultdict(list)
         self.variables = {}
         self.static_lib = None
         self.shared_lib = None
         self.program = None
         self.exports = set()
 
+        # These files are special, ignore anything that generates them or
+        # depends on them.
+        self._skip_files = [
+            'signmar',
+            'libxul.so',
+            'libtestcrasher.so',
+        ]
+
         self.fh = FileAvoidWrite(self.name, capture_diff=True, dry_run=dry_run)
         self.fh.write('# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT EDIT.\n')
         self.fh.write('\n')
 
     def write(self, buf):
         self.fh.write(buf)
 
     def include_rules(self):
         if not self.rules_included:
             self.write('include_rules\n')
             self.rules_included = True
 
     def rule(self, cmd, inputs=None, outputs=None, display=None,
              extra_inputs=None, extra_outputs=None, check_unchanged=False):
         inputs = inputs or []
         outputs = outputs or []
+
+        for f in inputs + outputs:
+            if any(f.endswith(skip_file) for skip_file in self._skip_files):
+                return
+
         display = display or ""
         self.include_rules()
         flags = ""
         if check_unchanged:
             # This flag causes tup to compare the outputs with the previous run
             # of the command, and skip the rest of the DAG for any that are the
             # same.
             flags += "o"
@@ -278,19 +291,16 @@ class TupBackend(CommonBackend):
         return cmd
 
     def _lib_paths(self, objdir, libs):
         return [mozpath.relpath(mozpath.join(l.objdir, l.import_name), objdir)
                 for l in libs]
 
     def _gen_shared_library(self, backend_file):
         shlib = backend_file.shared_lib
-        if shlib.name == 'libxul.so':
-            # This will fail to link currently due to missing rust symbols.
-            return
 
         if shlib.cxx_link:
             mkshlib = (
                 [backend_file.environment.substs['CXX']] +
                 backend_file.local_flags['CXX_LDFLAGS']
             )
         else:
             mkshlib = (
@@ -308,19 +318,16 @@ class TupBackend(CommonBackend):
         objs, _, shared_libs, os_libs, static_libs = self._expand_libs(shlib)
         static_libs = self._lib_paths(backend_file.objdir, static_libs)
         shared_libs = self._lib_paths(backend_file.objdir, shared_libs)
 
         list_file_name = '%s.list' % shlib.name.replace('.', '_')
         list_file = self._make_list_file(backend_file.objdir, objs, list_file_name)
 
         inputs = objs + static_libs + shared_libs
-        if any(i.endswith('libxul.so') for i in inputs):
-            # Don't attempt to link anything that depends on libxul.
-            return
 
         symbols_file = []
         if shlib.symbols_file:
             inputs.append(shlib.symbols_file)
             # TODO: Assumes GNU LD
             symbols_file = ['-Wl,--version-script,%s' % shlib.symbols_file]
 
         cmd = (
@@ -348,19 +355,16 @@ class TupBackend(CommonBackend):
 
     def _gen_program(self, backend_file):
         cc_or_cxx = 'CXX' if backend_file.program.cxx_link else 'CC'
         objs, _, shared_libs, os_libs, static_libs = self._expand_libs(backend_file.program)
         static_libs = self._lib_paths(backend_file.objdir, static_libs)
         shared_libs = self._lib_paths(backend_file.objdir, shared_libs)
 
         inputs = objs + static_libs + shared_libs
-        if any(i.endswith('libxul.so') for i in inputs):
-            # Don't attempt to link anything that depends on libxul.
-            return
 
         list_file_name = '%s.list' % backend_file.program.name.replace('.', '_')
         list_file = self._make_list_file(backend_file.objdir, objs, list_file_name)
 
         outputs = [mozpath.relpath(backend_file.program.output_path.full_path,
                                    backend_file.objdir)]
         cmd = (
             [backend_file.environment.substs[cc_or_cxx], '-o', '%o'] +