浏览代码

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
Brad King 10 年之前
父节点
当前提交
80afe28a10
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/cmGlobalNinjaGenerator.cxx

+ 1 - 1
Source/cmGlobalNinjaGenerator.cxx

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