| Index: tools/gn/ninja_target_writer.cc
|
| diff --git a/tools/gn/ninja_target_writer.cc b/tools/gn/ninja_target_writer.cc
|
| index 76413076685207938ec73c2bd9d192ae0efa8f16..8cd8573786ef282996ce6b323303ae5c94f81fdb 100644
|
| --- a/tools/gn/ninja_target_writer.cc
|
| +++ b/tools/gn/ninja_target_writer.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/files/file_util.h"
|
| #include "base/strings/string_util.h"
|
| +#include "tools/gn/dereference_comparator.h"
|
| #include "tools/gn/err.h"
|
| #include "tools/gn/escape.h"
|
| #include "tools/gn/filesystem_utils.h"
|
| @@ -207,14 +208,13 @@ OutputFile NinjaTargetWriter::WriteInputDepsStampAndGetDep(
|
| }
|
|
|
| // The different souces of input deps may duplicate some targets, so uniquify
|
| - // them (ordering doesn't matter for this case).
|
| - std::set<const Target*> unique_deps;
|
| + // them. Note that the order matters, or the output is non-deterministic.
|
| + PointerSet<const Target> unique_deps;
|
|
|
| // Hard dependencies that are direct or indirect dependencies.
|
| - const std::set<const Target*>& hard_deps = target_->recursive_hard_deps();
|
| - for (const auto& dep : hard_deps)
|
| - unique_deps.insert(dep);
|
| + const PointerSet<const Target>& hard_deps = target_->recursive_hard_deps();
|
|
|
| + unique_deps.insert(hard_deps.begin(), hard_deps.end());
|
| // Extra hard dependencies passed in.
|
| unique_deps.insert(extra_hard_deps.begin(), extra_hard_deps.end());
|
|
|
|
|