Bug 1478499 - Skip additional js shell installation via ObjdirFiles in the tup build. r=mshal

Having an output to !/js/src/js causes problems for tup, because many
compilation invocations will attempt to find headers in !/js/src/js,
meaning tup thinks these invocations should depend on generating
!/js/src/js (the file).

MozReview-Commit-ID: CHP20RqH1OM

--HG--
extra : rebase_source : d2fd8ac808a2c9c548eb3962abae5002366d1ea3
This commit is contained in:
Chris Manchester 2018-07-31 15:16:04 -07:00
parent 533c7f8511
commit 280ad8e1df

View File

@ -941,9 +941,22 @@ class TupBackend(CommonBackend):
if not path:
raise Exception("Cannot install to " + target)
js_shell = self.environment.substs.get('JS_SHELL_NAME')
if js_shell:
js_shell = '%s%s' % (js_shell,
self.environment.substs['BIN_SUFFIX'])
for path, files in obj.files.walk():
self._add_features(target, path)
for f in files:
if (js_shell and isinstance(obj, ObjdirFiles) and
f.endswith(js_shell)):
# Skip this convenience install for now. Accessing
# !/js/src/js when trying to find headers creates
# an error for tup when !/js/src/js is also a target.
continue
output_group = None
if any(mozpath.match(mozpath.basename(f), p)
for p in self._compile_env_files):