Apple Sillicon and clangd in Chromium repository

186 views
Skip to first unread message

Invision W

unread,
Oct 9, 2024, 11:36:13 AM10/9/24
to Chromium-dev
Hello everyone!

I tried to work with the chromium repository using an Apple Silicon device, but unfortunately it was not successful.

I would like to ask the developers - is there really no one developing Chromium using Apple devices based on ARM processors?

The project compiles successfully, runs, I have background indexing disabled in clangd, so that files are processed only when they are opened.
Even enabling it does not help.

So, some files open successfully and code autocompletion works, but clangd cannot digest most files, a lot of diagnostic errors, or if the file is processed successfully, then after I enter any letter - clangd crashes and restarts.

danakj

unread,
Oct 9, 2024, 12:19:11 PM10/9/24
to dmtr...@gmail.com, Chromium-dev
I personally find clangd to be very crashy on x64 too, so I don't use it.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/95220858-25d7-4e71-8def-e562e3b577e6n%40chromium.org.

danakj

unread,
Oct 9, 2024, 12:23:09 PM10/9/24
to Invision W, Chromium-dev
You can use source.chromium.org for cross-references.

On Wed, Oct 9, 2024 at 12:20 PM Invision W <dmtr...@gmail.com> wrote:
So, it turns out that all that's left is to use a notepad?)

среда, 9 октября 2024 г. в 20:19:11 UTC+4, danakj:

K. Moon

unread,
Oct 9, 2024, 3:02:24 PM10/9/24
to danakj, Invision W, Chromium-dev
It sounds like your question is mostly about clangd, rather than anything to do with Apple Silicon.

Make sure you've followed the directions here:

If you're still having problems after following those steps exactly, feel free to ask them here.

Invision W

unread,
Oct 10, 2024, 12:10:07 PM10/10/24
to Chromium-dev, danakj, Chromium-dev, dmtr...@gmail.com
So, it turns out that all that's left is to use a notepad?)

среда, 9 октября 2024 г. в 20:19:11 UTC+4, danakj:
I personally find clangd to be very crashy on x64 too, so I don't use it.

Sean Maher

unread,
Oct 10, 2024, 12:10:35 PM10/10/24
to km...@chromium.org, danakj, Invision W, Chromium-dev
To add on to this, plenty of people (myself included) do use clangd on Apple Silicon. At first blush this sounds like something wrong with your configuration. Did you properly configure your compile_commands.json?

Invision W

unread,
Oct 10, 2024, 12:10:46 PM10/10/24
to Sean Maher, km...@chromium.org, danakj, Chromium-dev
What can be configured there?
I follow the instructions https://chromium.googlesource.com/chromium/src/+/main/docs/mac_build_instructions.md
After cloning depot_tools and fetching chromium next steps are:
1) gn gen out/Default
2) ninja -C out/Default chrome
3) python3 src/tools/clang/scripts/generate_compdb.py -p src/out/Default > compile_commands.json
4) copy tools/vscode to .vscode
5) add clangd.path to ${workspaceFolder}/third_party/llvm-build/Release+Asserts/bin/clangd
6) add clangd.arguments to --background-index=false and --pch-storage=memory
7) open VSCode with clangd installed.
8) done

I would like to add that some files open successfully, while others have quite a lot of diagnostic errors, and when you start entering text, clangd restarts (crash)
For example I couldn't open window_sizer.cc either chrome/browser/ui/browser_commands.cc, clangd stop work due to many errors (there shouldn't be any, and -ferror-limit=0 is not a solution).

ср, 9 окт. 2024 г. в 23:04, Sean Maher <sp...@chromium.org>:
Reply all
Reply to author
Forward
0 new messages