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

MozReview-Commit-ID: CDO3bTGB4tj

--HG--
extra : rebase_source : dfbd0e6bc3fa9bcdbd96de38e85e38dc945275bc
This commit is contained in:
Chris Manchester 2018-05-30 15:25:22 -07:00
Родитель adac97a0fe
Коммит 1b8f9ac1a6
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)