Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Thoughts on LSP / Clangd integration

> I looked now for a long time on clang and it took a long time, until
> they even provided windows builds. A windows user is usually not
> expecting to compile the tools from source by themself, they expect
> binaries.

We will definitely not require users to compile clangd from source :)
I expect the clangd project will provide binaries in due course, and
we could even optionally ship them with CDT for convenience.

Keep in mind both projects (clangd, and our integration with it), are
at a very early stage. The current state of things does not reflect
the state things will be in when we have a shipping product.

> The second thing, that the user expects from a toolchain (compiler) is,
> that it is working, and that the full way. The problem with clang is,
> that they place themelf as a *compiler* replacement, but not providing
> the full toolchain, which would require to have also the libs and
> runtimes. For this, you would need to install on windows either a gcc or
> even a MS Windows SDK / compiler, in order to actually create an
> executables.
> 
> So, if I have to install either of MS or gcc compiler, why would I now
> install the clang? I don't see the benefit of it, since gcc now also
> provides much better failre reporting. I can't give any input on
> compiling performance, since I'm not doing C++ development, but only C.

As Doug already clarified, using clangd to power editor features does
not require using clang to produce your binaries. You can continue
producing your binaries with whatever compiler you want.

(The notion of using different compiler engines to build your code
and to analyze it might seem prone to incompatibilities, but in fact
Microsoft has been doing it all along: Visual Studio's IntelliSense 
engine is powered by the proprietary EDG compiler front-end, which
is different from what MSVC uses for actual compilation.)

> From your request, I also only see "our C++ editor" .. I guess, C++
> gives you a lot of headache, but there is and will still be C (here we
> have now C11). The question is, if you go that direction, will the
> tooling still be able to cope with the languages for those, that don't
> used clang at all.

Sorry, I tend to focus in on C++ sometimes because that is what I
use CDT for :)

Clang (and clangd) support C just as well as C++. In fact, using
clangd will help fill gaps in our C support as well. For example,
there are some C11 features like "_Generic" that we don't currently
support. With clangd we'll get that support for free as well.

Regards,
Nate

Back to the top