Backed out 2 changesets (bug 1440879) for build bustages on mozbuild\test\backend. CLOSED TREE
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Tue, 04 Sep 2018 18:38:19 +0300
changeset 482913 765f2d8c3340643b55647c5e4918554a27942906
parent 482911 d8cc54d235c9ed041d3f08ade06f7ac357c90c97
child 482915 a1452a7d444217bda03e26567710f4f7e27d3f3d
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
bugs1440879
milestone63.0a1
backs out93892cfed0155d11a86c199785bde65b2f59801a
71d5693227000f0b4ebc1012ae1c74766ce6ee20
Backed out 2 changesets (bug 1440879) for build bustages on mozbuild\test\backend. CLOSED TREE Backed out changeset 93892cfed015 (bug 1440879) Backed out changeset 71d569322700 (bug 1440879)
config/moz.build
python/mozbuild/mozbuild/backend/common.py
python/mozbuild/mozbuild/frontend/data.py
--- a/config/moz.build
+++ b/config/moz.build
@@ -42,20 +42,16 @@ include('stl-headers.mozbuild')
 if CONFIG['WRAP_STL_INCLUDES']:
     stl_compiler = None
     if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
         stl_compiler = 'gcc'
     elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
         stl_compiler = 'msvc'
 
     if stl_compiler:
-        # Note that the 'stl_wrappers' folder is known to the build system as
-        # containing generated files; if this is changed here then the code in
-        # GeneratedFile.__init__ in python/mozbuild/mozbuild/frontend/data.py
-        # might need to be updated accordingly as well.
         template_file = SRCDIR + '/%s-stl-wrapper.template.h' % stl_compiler
         output_dir = '../dist/stl_wrappers'
         # We have to use a sentinel file as the first file because the
         # file_generate action will create it for us, but we want to create all
         # the files in gen_wrappers()
         outputs = tuple(['stl.sentinel'] + ['%s/%s' % (output_dir, h) for h in stl_headers])
         GENERATED_FILES += [outputs]
         stl = GENERATED_FILES[outputs]
--- a/python/mozbuild/mozbuild/backend/common.py
+++ b/python/mozbuild/mozbuild/backend/common.py
@@ -23,17 +23,16 @@ from mozbuild.frontend.context import (
 )
 from mozbuild.frontend.data import (
     BaseProgram,
     ChromeManifestEntry,
     ConfigFileSubstitution,
     Exports,
     FinalTargetPreprocessedFiles,
     FinalTargetFiles,
-    GeneratedFile,
     GeneratedSources,
     GnProjectData,
     HostLibrary,
     HostGeneratedSources,
     HostRustLibrary,
     IPDLCollection,
     LocalizedPreprocessedFiles,
     LocalizedFiles,
@@ -165,24 +164,16 @@ class CommonBackend(BuildBackend):
         elif isinstance(obj, SharedLibrary):
             self._binaries.shared_libraries.append(obj)
             return False
 
         elif isinstance(obj, (GeneratedSources, HostGeneratedSources)):
             self._handle_generated_sources(obj.files)
             return False
 
-        elif isinstance(obj, GeneratedFile):
-            if obj.required_for_compile:
-                for f in obj.required_for_compile:
-                    fullpath = ObjDirPath(obj._context, '!' + f).full_path
-                    relpath = mozpath.relpath(fullpath, obj._context.config.topobjdir)
-                    self._handle_generated_sources([relpath])
-            return False
-
         elif isinstance(obj, Exports):
             objdir_files = [f.full_path for path, files in obj.files.walk() for f in files if isinstance(f, ObjDirPath)]
             if objdir_files:
                 self._handle_generated_sources(objdir_files)
             return False
 
         elif isinstance(obj, GnProjectData):
             # These are only handled by special purpose build backends,
--- a/python/mozbuild/mozbuild/frontend/data.py
+++ b/python/mozbuild/mozbuild/frontend/data.py
@@ -1163,18 +1163,19 @@ class GeneratedFile(ContextDerived):
 
         suffixes = (
             '.c',
             '.cpp',
             '.h',
             '.inc',
             '.py',
             '.rs',
+            'new', # 'new' is an output from make-stl-wrappers.py
         )
-        self.required_for_compile = [f for f in self.outputs if f.endswith(suffixes) or 'stl_wrappers/' in f]
+        self.required_for_compile = any(f.endswith(suffixes) for f in self.outputs)
 
 
 class ChromeManifestEntry(ContextDerived):
     """Represents a chrome.manifest entry."""
 
     __slots__ = (
         'path',
         'entry',