Bug 1462489 - Re-generate the build backend when a build backend output is missing. r=mshal

MozReview-Commit-ID: CDO3bTGB4tj

--HG--
extra : rebase_source : 9bf580435d78a5048d05f7a37d8eff76b16f6ac9
This commit is contained in:
Chris Manchester 2018-05-30 15:25:22 -07:00
Родитель 508b393aa6
Коммит dbbf582ded
1 изменённых файлов: 13 добавлений и 0 удалений

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

@ -993,6 +993,19 @@ class BuildDriver(MozbuildObject):
return False
def backend_out_of_date(backend_file):
if not os.path.isfile(backend_file):
return True
# Check if any of our output files have been removed since
# we last built the backend, re-generate the backend if
# so.
outputs = []
with open(backend_file, 'r') as fh:
outputs = fh.read().splitlines()
for output in outputs:
if not os.path.isfile(mozpath.join(self.topobjdir, output)):
return True
dep_file = '%s.in' % backend_file
return build_out_of_date(backend_file, dep_file)