Skip to content

Ninja: Fix unity build dependencies on generated source files

We generate unity build sources that #include the original sources by absolute path, so compiler-generated depfiles reference the original sources by absolute path. If an original source is generated inside the build tree, the build statement we write to build.ninja to generate the file references its output by relative path. Ninja will not hook up this dependency due to Ninja Issue 1251. Work around the problem by listing the absolute path to each custom command output as an implicit output of its build statement.

Fixes: #21865 (closed)

Merge request reports

Loading