Ninja: Do not generate circular phony rules (#15454)

The phony rules added by commit v2.8.12~248^2 (Ninja: Custom Command
file depends don't need to exist before building, 2013-06-07) are
circular, e.g.

  build side-effect: phony side-effect

This is not diagnosed by Ninja as of version 1.5, but the dependency
does not make sense.  Simply drop it and use phony rules of the form

  build side-effect: phony

instead.

Reported-by: Daniel Dunbar
This commit is contained in:
Brad King 2015-03-18 12:51:28 -04:00
parent 380db3de00
commit 80afe28a10
1 changed files with 1 additions and 1 deletions

View File

@ -1069,7 +1069,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
this->WritePhonyBuild(os, this->WritePhonyBuild(os,
"", "",
deps, deps,
deps); cmNinjaDeps());
} }
} }
} }