Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: alex.kanavin@gmail.com, anakin@childerhose.ca
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 1/3] clangd: add compile_commands.bbclass
Date: Mon, 4 Aug 2025 08:52:45 -0700	[thread overview]
Message-ID: <decc4bbb-0dd5-4473-b4e0-1d6eb2edeeb4@gmail.com> (raw)
In-Reply-To: <CANNYZj9fC5=jD_-UAmrGdv+rSrF_L968jaHK3_xwZ6o=Xbu9vw@mail.gmail.com>



On 8/4/25 3:42 AM, Alexander Kanavin via lists.openembedded.org wrote:
> On Sun, 3 Aug 2025 at 03:04, Anakin Childerhose via
> lists.openembedded.org <anakin=childerhose.ca@lists.openembedded.org>
> wrote:
>> Add a class to link the ${B}/compile_commands.json file to
>> ${S}/compile_commands.json to automatically configure the clangd
>> language server for build systems that generate a compile_commands.json
>> file.
> 
> I don't understand this description. What does this json file do, what
> does clangd language server do,

It will be good to summarize that it implements LSP for C/C++ and 
reference to https://microsoft.github.io/language-server-protocol/

  why can't it find the original file in
> ${S} and should that be fixed instead? Having different directories
> for source and build artefacts is common, and we shouldn't be fixing
> it up for others.
> 

Clangd tries several search paths in S and B as well, but perhaps
something is unique about OE build structure that it is not able to
find it ?

clangd has --compile-commands-dir=<...> option which might be of 
interest here

Aside from this, I think it will be good to add 
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON via cmake.bbclass if someone wants
LSP at distro level.

> Alex
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#221424): https://lists.openembedded.org/g/openembedded-core/message/221424
> Mute This Topic: https://lists.openembedded.org/mt/114509177/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



  reply	other threads:[~2025-08-04 15:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-03  1:04 [PATCH 0/3] Automatically add compile_commands.json to ${S} Anakin Childerhose
2025-08-03  1:04 ` [PATCH 1/3] clangd: add compile_commands.bbclass Anakin Childerhose
2025-08-04 10:42   ` [OE-core] " Alexander Kanavin
2025-08-04 15:52     ` Khem Raj [this message]
2025-08-03  1:04 ` [PATCH 2/3] cmake.bbclass: inherit compile_commands.bbclass Anakin Childerhose
2025-08-03  1:04 ` [PATCH 3/3] meson.bbclass: " Anakin Childerhose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=decc4bbb-0dd5-4473-b4e0-1d6eb2edeeb4@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=alex.kanavin@gmail.com \
    --cc=anakin@childerhose.ca \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox