Conversation
|
✅ PR OK, no changes in deprecations or warnings Total deprecations: 0 Total warnings: 0 Build statistics: statistics (-before, +after)
executable size=5722856 bin/dub
rough build time=53sFull build output |
| f.writeln(" command = ", compiler, " $flags -c $in -of=$out"); | ||
| f.writeln(" command = ", compiler, " $flags -c $in -of=$out -makedeps=$out.dep"); | ||
| f.writeln(" depfile = $out.dep"); | ||
| f.writeln(" deps = gcc"); |
There was a problem hiding this comment.
what is this line for?
There was a problem hiding this comment.
deps = gcc tells Ninja to parse the depfile in gcc/Makefile format (vs MSVC's /showIncludes). Combined with depfile = $out.dep, it lets Ninja pick up implicit dependencies from the -makedeps output — e.g. string imports like views/data.txt — so those trigger rebuilds too, not just the direct source file. This is validated across Windows too, not just Linux — the behavioral test passes on 8 different Windows compiler configs (dmd 2.100–latest, ldc 1.30–master); the only Windows failure is an unrelated LNK1318 linker flake in a different test.
Adds -makedeps dependency tracking to the ninja dc rule so ninja
can track implicit dependencies (string imports, headers) and
trigger incremental rebuilds correctly.
Also fixes a bug where -J flags for stringImportPaths were not
being emitted, which would silently break any project using
string imports.
Test: builds a project with a string import, runs it to verify
output matches the imported file content, modifies the file,
rebuilds, and asserts the output changed — proving dependency
tracking works end-to-end.