Adding an order-only dependency edge ensures that all of the generated sources are built before writing the compile_commands.json. This ensures that by the time that tooling sees the compiledb, it is able to build everything in it. Without it, you may get spurious failures in an indexer if it notices the new db and tries to build anything that relies on new generated sources. This also allows people to just run ninja compiledb in order to get indexing working, and to keep it up to date as things change.
compile_commands.json should have an order-only dependency on generated-sources
- Assignee:
- Tausif Rahman (Inactive)
- Reporter:
- Mathias Stearn
- Votes:
-
0 Vote for this issue
- Watchers:
-
7 Start watching this issue
- Created:
- Updated:
- Resolved: