|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 3/3] build: add compile_commands.json target
On Mon, Aug 10, 2026 at 10:49:45AM +0100, George Dunlap wrote: > Add a convenience target generating the compilation database from a > built object tree, alongside the other developer conveniences (tags, > cscope, cloc -- the last of which already walks the same .cmd files): > > make -C xen compile_commands.json > > The output lands in the object tree root. For an in-tree build, > clangd and other consumers discover it there automatically when > opening files; for an out-of-tree build, symlink it into the source > tree root (consumers search the ancestors of the file being edited). > > Note the database records the compiler invocations actually used. > With a clang build it is consumable by clangd as-is; for a gcc build, > clang-based tools may need a small .clangd configuration > (CompileFlags: Remove/Add) dropping gcc-only flags. > > Also add the generated file to .gitignore. > > Assisted-by: LLM > Signed-off-by: George Dunlap <gwd@xxxxxxxxxxxxxx> Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |