diff --git a/config/moz.build b/config/moz.build index ce6297393373..d9c28fe54d05 100644 --- a/config/moz.build +++ b/config/moz.build @@ -47,10 +47,6 @@ if CONFIG['WRAP_STL_INCLUDES']: 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 diff --git a/python/mozbuild/mozbuild/backend/common.py b/python/mozbuild/mozbuild/backend/common.py index 25f96113a683..949bbee30eb8 100644 --- a/python/mozbuild/mozbuild/backend/common.py +++ b/python/mozbuild/mozbuild/backend/common.py @@ -28,7 +28,6 @@ from mozbuild.frontend.data import ( Exports, FinalTargetPreprocessedFiles, FinalTargetFiles, - GeneratedFile, GeneratedSources, GnProjectData, HostLibrary, @@ -170,14 +169,6 @@ class CommonBackend(BuildBackend): 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: diff --git a/python/mozbuild/mozbuild/frontend/data.py b/python/mozbuild/mozbuild/frontend/data.py index b737b5ea2e1f..6bdf7ce543ce 100644 --- a/python/mozbuild/mozbuild/frontend/data.py +++ b/python/mozbuild/mozbuild/frontend/data.py @@ -1168,8 +1168,9 @@ class GeneratedFile(ContextDerived): '.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):