зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1491967 - Translate arguments to |./mach build| to objdir paths when possible in the tup backend. r=firefox-build-system-reviewers,mshal
Differential Revision: https://phabricator.services.mozilla.com/D6084 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4c389d3514
Коммит
2ca27f0e2a
|
@ -301,6 +301,19 @@ class TupBackend(CommonBackend):
|
||||||
def build(self, config, output, jobs, verbose, what=None):
|
def build(self, config, output, jobs, verbose, what=None):
|
||||||
if not what:
|
if not what:
|
||||||
what = ['%s/<default>' % config.topobjdir]
|
what = ['%s/<default>' % config.topobjdir]
|
||||||
|
else:
|
||||||
|
# Translate relsrcdir paths to the objdir when possible.
|
||||||
|
translated = []
|
||||||
|
topsrcdir = mozpath.normpath(config.topsrcdir)
|
||||||
|
for path in what:
|
||||||
|
path = mozpath.abspath(path)
|
||||||
|
if path.startswith(topsrcdir):
|
||||||
|
objdir_path = path.replace(topsrcdir, config.topobjdir)
|
||||||
|
if os.path.exists(objdir_path):
|
||||||
|
path = objdir_path
|
||||||
|
translated.append(path)
|
||||||
|
what = translated
|
||||||
|
|
||||||
args = [self.environment.substs['TUP'], 'upd'] + what
|
args = [self.environment.substs['TUP'], 'upd'] + what
|
||||||
if self.environment.substs.get('MOZ_AUTOMATION'):
|
if self.environment.substs.get('MOZ_AUTOMATION'):
|
||||||
args += ['--quiet']
|
args += ['--quiet']
|
||||||
|
|
Загрузка…
Ссылка в новой задаче