[cfe-dev] How to generate compile_commands.json for clang?

Ilya Biryukov via cfe-dev cfe-dev at lists.llvm.org
Mon Apr 1 02:48:45 PDT 2019

Hi Guangqing,

Does 'ninja clang' (or 'make clang') produce any results?
Did you specify '-DLLVM_ENABLE_PROJECTS=clang' in your initial CMake run?

On Sun, Mar 31, 2019 at 6:04 PM Guangqing Chen via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hi,
> I'm new to clang.
> I follow the [get_started](https://clang.llvm.org/get_started.html) to
> build clang (on linux).
> However, if I add `-DCMAKE_EXPORT_COMPILER_COMMANDS` to the cmake command,
> the resulted compile_commands.json only contains llvm related cpp.
> What should I do to get that of clang?
> Thanks for any help!
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

Ilya Biryukov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190401/8a9c0a18/attachment.html>

More information about the cfe-dev mailing list