[llvm-dev] Properly configuring vscode for LLVM development

Nicolas Vasilache via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 1 06:40:54 PST 2021


Hi everyone,

I am trying to use vscode for cmake development and so far I have been only
moderately successful.

I think I have most of the things right (including clangd and autocomplete)
but I still have a few issues:

1. I am not able to configure vscode + cmake such that the project only
rebuilds incrementally. As a consequence a tiny change retriggers
compilation of the whole thing. Since I configured ccache I get close to
100% hits but this still takes ~1-2 minutes instead of a few seconds by
using cmake -Ninja on the command line.
(I think) I have been careful to not trigger spurious stuff (e.g.)

    "cmake.generator": "Ninja",
    "cmake.clearOutputBeforeBuild": false,
    "cmake.configureOnEdit": false,
    "cmake.exportCompileCommandsFile": false,
    "cmake.autoSelectActiveFolder": false,
    "cmake.useCMakePresets": "never",

but to no avail ..

The other 2 may be related to my not investing the time to dig further
until I have a proper solution to point 1.

2. I am not sure how to set the tests for easily pinpointing particular
errors, running a single test through the IDE and fixing it inline. Maybe
we are spoiled but our internal Google setup makes it very easy to do such
things.

3. I am not sure how to set up the integrated debugger to have a clicky
debugging nice setup. I have some old recollections circa VC++ 6.0 ish
where these things were quite nice to navigate and I am hoping to

Some additional details that may be of relevanceL
A. I am on a Linux boc (and running through a remote connection from my mac
laptop).
B. I am using a third-party project and I am making use of some MLIR side
features to build stuff
together with LLVM. In particular:
    "cmake.sourceDirectory": "${workspaceFolder}/../llvm-project/llvm",
Note that this is not a problem in my CLI-only setup where things behave
like I expect them

Does anyone know of a good setup I could replicate?

If you're replying to this, please +1 me in the conversation because email
is hard.

Thanks much!

-- 
N
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211201/74bcd69e/attachment.html>


More information about the llvm-dev mailing list