Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

clang-format in depot_tools

869 views
Skip to first unread message

Luigi Semenzato

unread,
Sep 3, 2023, 2:22:41 PM9/3/23
to infra-dev, Gurchetan Singh
As mentioned in b/279222930, the minigbm presubmit tries to run clang-format and, when run outside the cros_sdk, it finds the one in depot_tools, which complains that it can't find a valid binary, even though I have one in /usr/bin/clang-format.  It's probably not the same clang-format as inside the sdk, but maybe it's good enough?  Cheers!

Gurchetan Singh

unread,
Sep 7, 2023, 12:15:49 PM9/7/23
to Luigi Semenzato, infra-dev
On Sat, Sep 2, 2023 at 11:10 AM Luigi Semenzato <seme...@google.com> wrote:
As mentioned in b/279222930, the minigbm presubmit tries to run clang-format and, when run outside the cros_sdk, it finds the one in depot_tools, which complains that it can't find a valid binary, even though I have one in /usr/bin/clang-format.  It's probably not the same clang-format as inside the sdk, but maybe it's good enough?  Cheers!

This happens many times when depot_tools is available, but the user is not inside the chroot.

You need to download chromium build tools:


And download the clang-format with the correct sha1:


Then you need to set CHROMIUM_BUILDTOOLS_PATH=~/buildtools

Then it will work.

 

Luigi Semenzato

unread,
Sep 7, 2023, 2:02:54 PM9/7/23
to Gurchetan Singh, infra-dev
Thank you for the information!
Reply all
Reply to author
Forward
0 new messages