Bug 1319222 - Use relobjdir instead of relativedir to determine outputs; r=chmanchester draft
authorMike Shal <mshal@mozilla.com>
Wed, 22 Nov 2017 11:24:12 -0500
changeset 707631 c831cf9c72cf5c340c8f108e59d279ab53fc421f
parent 707630 dc33cfe270a71e8cf190475dfc926c9d5b37c702
child 707632 69fbea3ee15901f98f594366414106bdede8983d
push id92183
push userbmo:mshal@mozilla.com
push dateTue, 05 Dec 2017 16:33:02 +0000
reviewerschmanchester
bugs1319222
milestone59.0a1
Bug 1319222 - Use relobjdir instead of relativedir to determine outputs; r=chmanchester In most cases, relobjdir is the same as relativedir. However they are different for some objects, notably with nss gyp handling. We need to output files in relobjdir, so use that when getting the BackendTupfile. This puts generated files like certdata.c in the directory that moz.build is expecting. MozReview-Commit-ID: DG29OulOKAz
python/mozbuild/mozbuild/backend/tup.py
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -199,17 +199,17 @@ class TupOnly(CommonBackend, PartialBack
         objdir = mozpath.join(self.environment.topobjdir, relativedir)
         if objdir not in self._backend_files:
             self._backend_files[objdir] = \
                     BackendTupfile(objdir, self.environment,
                                    self.environment.topsrcdir, self.environment.topobjdir)
         return self._backend_files[objdir]
 
     def _get_backend_file_for(self, obj):
-        return self._get_backend_file(obj.relativedir)
+        return self._get_backend_file(obj.relobjdir)
 
     def _py_action(self, action):
         cmd = [
             '$(PYTHON)',
             '-m',
             'mozbuild.action.%s' % action,
         ]
         return cmd