Index: tools/gn/target.cc |
diff --git a/tools/gn/target.cc b/tools/gn/target.cc |
index 4a93abc240cd36655d24a9ec8e0a9d52749e8543..e6a14c6e4d67200ad7f328e3b6eff5f299ab516f 100644 |
--- a/tools/gn/target.cc |
+++ b/tools/gn/target.cc |
@@ -9,6 +9,7 @@ |
#include "base/strings/stringprintf.h" |
#include "tools/gn/config_values_extractors.h" |
#include "tools/gn/deps_iterator.h" |
+#include "tools/gn/dereference_comparator.h" |
#include "tools/gn/filesystem_utils.h" |
#include "tools/gn/scheduler.h" |
#include "tools/gn/substitution_writer.h" |
@@ -70,7 +71,7 @@ Err MakeStaticLibDepsError(const Target* from, const Target* to) { |
bool EnsureFileIsGeneratedByDependency(const Target* target, |
const OutputFile& file, |
bool check_private_deps, |
- std::set<const Target*>* seen_targets) { |
+ PointerSet<const Target>* seen_targets) { |
if (seen_targets->find(target) != seen_targets->end()) |
return false; // Already checked this one and it's not found. |
seen_targets->insert(target); |
@@ -548,7 +549,11 @@ void Target::CheckSourceGenerated(const SourceFile& source) const { |
// the list of files written by the GN build itself (often response files) |
// can be filtered out of this list. |
OutputFile out_file(settings()->build_settings(), source); |
- std::set<const Target*> seen_targets; |
+ PointerSet<const Target> seen_targets; |
if (!EnsureFileIsGeneratedByDependency(this, out_file, true, &seen_targets)) |
g_scheduler->AddUnknownGeneratedInput(this, source); |
} |
+ |
+bool Target::operator<(const Target& other) const { |
+ return label() < other.label(); |
+} |