1
0
Fork
You've already forked zig_writecc
0
Example project using Zig to build and write compile_commands.json file.
  • Zig 91.4%
  • C 8.6%
2023年05月19日 10:00:47 -06:00
src Initial import 2023年03月23日 07:48:00 -06:00
build.zig Update for zig compile 0.11.0-dev.3218+b873ce1e0 2023年05月19日 10:00:47 -06:00
README.md Initial import 2023年03月23日 07:48:00 -06:00

Build Compile Commands with Zig

This is an example build file that uses clang's -gen-cdb-fragment-path to write a compile commands fragment, and then gathers them all together into a single compile_commands.json file.

To build the project and create copmile_commands.json run:

$ zig build writecc

Notes

This project is really just my way of remembering how to build a C/C++ project with Zig. My editor uses clangd when editing C/C++ code, and after it complained one too many times about missing compile_commands.json I decided to add that ability to my build file.

Requires a recent version of Zig, probably recent enough to run ziglings.