• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1This folder contains clang-format scripts. The binaries will be automatically
2downloaded from Google Storage by gclient runhooks for the current platform.
3
4For a walkthrough on how to maintain these binaries:
5  https://chromium.googlesource.com/chromium/src/+/main/docs/updating_clang_format_binaries.md
6
7To upload a file:
8  python ~/depot_tools/upload_to_google_storage.py -b chromium-clang-format <FILENAME>
9
10On Linux and Mac, check that clang-format has its +x bit set before you run this
11upload command. Don't upload Linux and Mac binaries from Windows, since
12upload_to_google_storage.py will not set the +x bit on google storage when it's
13run from Windows.
14
15To download a file given a .sha1 file:
16  python ~/depot_tools/download_from_google_storage.py -b chromium-clang-format -s <FILENAME>.sha1
17
18List the contents of GN's Google Storage bucket:
19  python ~/depot_tools/third_party/gsutil/gsutil ls gs://chromium-clang-format/
20
21To initialize gsutil's credentials:
22  python ~/depot_tools/third_party/gsutil/gsutil config
23
24  That will give a URL which you should log into with your web browser. The
25  username should be the one that is on the ACL for the "chromium-clang-format"
26  bucket (probably your @google.com address). Contact the build team for help
27  getting access if necessary.
28
29  Copy the code back to the command line util. Ignore the project ID (it's OK
30  to just leave blank when prompted).
31
32gsutil documentation:
33  https://developers.google.com/storage/docs/gsutil
34