update.py: add clang-tidy support + add a DEP
Since clang-tidy is its own package, we need support for pulling it
down automatically. The standard way of doing so appears to be adding
packages to update.py, so do that.
Bug: 633856
Change-Id: Ib9e1c9d99f3e9cb37eb9ae68cbc8fc5395fe2d39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1961070
Reviewed-by: Hans Wennborg <[email protected]>
Commit-Queue: George Burgess <[email protected]>
Cr-Commit-Position: refs/heads/master@{#723843}
diff --git a/DEPS b/DEPS
index ea11c570..e4d9b83 100644
--- a/DEPS
+++ b/DEPS
@@ -91,6 +91,9 @@
# the gn arg 'use_clang_coverage').
'checkout_clang_coverage_tools': False,
+ # Fetch clang-tidy into the same bin/ directory as our clang binary.
+ 'checkout_clang_tidy': False,
+
# By default do not check out the Oculus SDK. Only available for Googlers.
'checkout_oculus_sdk' : 'checkout_src_internal and checkout_win',
@@ -3500,6 +3503,15 @@
'--package=coverage_tools'],
},
{
+ # This is also supposed to support the same set of platforms as 'clang'
+ # above. LLVM ToT support isn't provided at the moment.
+ 'name': 'clang_tidy',
+ 'pattern': '.',
+ 'condition': 'checkout_clang_tidy',
+ 'action': ['python', 'src/tools/clang/scripts/update.py',
+ '--package=clang-tidy'],
+ },
+ {
# Mac doesn't use lld so it's not included in the default clang bundle
# there. lld is however needed in win and Fuchsia cross builds, so
# download it there. Should run after the clang hook.