Bug 1440879 - Emit source-like generated files into generated-sources.json. r=froydnj

This commit is contained in:
Kartikaya Gupta 2018-09-07 09:34:39 -04:00
Родитель ea4e07a085
Коммит 840a45b700
2 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -28,6 +28,7 @@ from mozbuild.frontend.data import (
Exports,
FinalTargetPreprocessedFiles,
FinalTargetFiles,
GeneratedFile,
GeneratedSources,
GnProjectData,
HostLibrary,
@ -169,6 +170,13 @@ 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
self._handle_generated_sources([fullpath])
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:

Просмотреть файл

@ -1172,7 +1172,7 @@ class GeneratedFile(ContextDerived):
'.rs',
'new', # 'new' is an output from make-stl-wrappers.py
)
self.required_for_compile = any(f.endswith(suffixes) for f in self.outputs)
self.required_for_compile = [f for f in self.outputs if f.endswith(suffixes)]
class ChromeManifestEntry(ContextDerived):