• Home
Name Date Size #Lines LOC

..--

OWNERSD12-May-202438 32

README.chromiumD12-May-2024367 1613

README.txtD12-May-20241.4 KiB3424

README.chromium

1Name: clang-format
2Short Name: clang-format
3URL: https://github.com/llvm/llvm-project/tree/main/clang/tools/clang-format
4Version: See DEPS
5Date: 26 January 2021
6Revision: See DEPS
7License: University of Illinois/NCSA Open Source License
8License File: NOT_SHIPPED
9Security Critical: No
10
11Description:
12A tool for formatting C++ code to style.
13
14Local Modifications:
15None
16

README.txt

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