Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: tools/gn/ninja_build_writer.h

Issue 1123283003: GN: Don't generate phony rules called "all". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/ninja_build_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | tools/gn/ninja_build_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698