Index: tools/gn/ninja_build_writer.h |
diff --git a/tools/gn/ninja_build_writer.h b/tools/gn/ninja_build_writer.h |
index 6f7bf3813a7090025602230191a38da6787e9b9a..fe7b7a5d3d98f5f95719edf27c481516590841f3 100644 |
--- a/tools/gn/ninja_build_writer.h |
+++ b/tools/gn/ninja_build_writer.h |
@@ -6,6 +6,7 @@ |
#define TOOLS_GN_NINJA_BUILD_WRITER_H_ |
#include <iosfwd> |
+#include <set> |
#include <vector> |
#include "tools/gn/path_output.h" |
@@ -44,8 +45,12 @@ class NinjaBuildWriter { |
void WriteSubninjas(); |
bool WritePhonyAndAllRules(Err* err); |
- void WritePhonyRule(const Target* target, const OutputFile& target_file, |
- const std::string& phony_name); |
+ // Writes a phony rule for the given target with the given name. Adds the new |
+ // name to the given set. If the name is already in the set, does nothing. |
+ void WritePhonyRule(const Target* target, |
+ const OutputFile& target_file, |
+ const std::string& phony_name, |
+ std::set<std::string>* written_rules); |
const BuildSettings* build_settings_; |
std::vector<const Settings*> all_settings_; |