Writers Block Adding New Build System Feature

Yup you hit the nail on the head with this:

Depending implicitly on all compile steps is troublesome.

I wanted it for the entire build graph. Meaning any dependencies you added with C/C++ source file containing Step.Compile would automatically have their output JSON db merged into one master db.

The more I think about it the more I agree with @iceghost. I’m not sure if it’s the Zig build system’s responsibility to be able to automatically spit out a single file for ALL Step.Compile in a build graph. Presumably even with dependencies you always have access to the underlying Step.Compile and so if it was important to you, you could merge them yourself using the already working step.getCompileCommandsJson().

Note that this original issue provides some context to why you might want a merged compile commands db for your entire project:

But sure send me your fork! Curious to take a look regardless to see what you came up with.

1 Like