在BUILD 文件中增加一个用于生成 compile_commands.json 文件的 target load("@hedron_compile_commands//:refresh_compile_commands.bzl","refresh_compile_commands") refresh_compile_commands( name ="refresh_compile_commands",# 指定目标 target 及其编译选项/参数(.bazelrc 中已有的参数/选项无需重复添加)targe...
能生成 clangd 的 compile_commands json 文件 工程配置 不方便提供,但看代码和堆栈分析, _make_arguments 的入参里面,target参数就是nil,报错符合预期 附加信息和错误日志 xmake project -Dv -k compile_commands --lsp=clangd build error: @programdir/core/main.lua:300: @programdir/plugins/project/clang/...
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON . Makefile 很多工程并不会使用CMake维护,因为生成的Makefile可读性比较差。这里可以使用Bear/Compiledb工具生成json文件 bear ubuntu下可以这样操作 sudo apt install bear bear make xxx 基本上可以解决大部分问题,但是碰到一些老的工程,bear无法完成生成json文件,谷歌也无...