[clangd-dev] Supporting gcc environments with clangd
Doug Schaefer via clangd-dev
clangd-dev at lists.llvm.org
Wed Jan 9 07:59:04 PST 2019
I'm pretty new to the LLVM project so I'm not sure how best to proceed.
We are working on using clangd in the Eclipse CDT context (which is now also building VS Code extensions) where we mainly support developers building embedded systems. Most of these systems use gcc as the compiler and where clang does not have target support.
I've been able to get clangd to properly deal with these projects by forking llmv and clang and adding Triples and Toolchains to properly set up the system include paths and built-in macros and other properties clang needs to parse.
I also have a hack in the clangd layer to figure out the '-target' argument from the gcc command and inject it when fetching from the compilation database. This part is especially ugly and I'm hoping to find a better way.
The main question I have: is there appetite for changes like this to be pushed upstream, even though these targets are not meant to be used by clang itself? Or is a fork the proper way to deal with this? Is there anyone else doing something similar?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the clangd-dev