Bug 1414781 - Also install clang-format r?glandium
MozReview-Commit-ID: A6Jlc5RXVuP
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -2397,22 +2397,25 @@ class StaticAnalysis(MachCommandBase):
if rc != 0:
return rc
clang_tidy_path = mozpath.join(self._mach_context.state_dir,
"clang-tidy")
self._clang_tidy_path = mozpath.join(clang_tidy_path, "clang", "bin",
"clang-tidy" + config.substs.get('BIN_SUFFIX', ''))
+ self._clang_format_path = mozpath.join(clang_tidy_path, "clang", "bin",
+ "clang-format" + config.substs.get('BIN_SUFFIX', ''))
self._clang_apply_replacements = mozpath.join(clang_tidy_path, "clang", "bin",
"clang-apply-replacements" + config.substs.get('BIN_SUFFIX', ''))
self._run_clang_tidy_path = mozpath.join(clang_tidy_path, "clang", "share",
"clang", "run-clang-tidy.py")
if os.path.exists(self._clang_tidy_path) and \
+ os.path.exists(self._clang_format_path) and \
os.path.exists(self._clang_apply_replacements) and \
os.path.exists(self._run_clang_tidy_path) and \
not force:
return 0
else:
if os.path.isdir(clang_tidy_path) and download_if_needed:
# The directory exists, perhaps it's corrupted? Delete it
# and start from scratch.
@@ -2470,16 +2473,17 @@ class StaticAnalysis(MachCommandBase):
clang_path = mozpath.join(clang_tidy_path, 'clang')
if not os.path.isdir(clang_path):
raise Exception('Extracted the archive but didn\'t find '
'the expected output')
assert os.path.exists(self._clang_tidy_path)
+ assert os.path.exists(self._clang_format_path)
assert os.path.exists(self._clang_apply_replacements)
assert os.path.exists(self._run_clang_tidy_path)
return 0
@CommandProvider
class Vendor(MachCommandBase):
"""Vendor third-party dependencies into the source repository."""