| 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..86bf3f57be6ebfffb28bb0bcfca32e52f224be0b 100644
|
| --- a/tools/gn/ninja_target_writer.cc
|
| +++ b/tools/gn/ninja_target_writer.cc
|
| @@ -17,6 +17,7 @@
|
| #include "tools/gn/ninja_group_target_writer.h"
|
| #include "tools/gn/ninja_utils.h"
|
| #include "tools/gn/output_file.h"
|
| +#include "tools/gn/pointer_set.h"
|
| #include "tools/gn/scheduler.h"
|
| #include "tools/gn/string_utils.h"
|
| #include "tools/gn/substitution_writer.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());
|
|
|
|
|