Clang's -M mode includes these extra dependencies in its output and clang-scan-deps
should have equivalent behavior, so adding these extradeps to output just like
how its being done for ".d" file generation mode.
This is a retry of https://reviews.llvm.org/rC375074. From the build-bot failure on
Windows, it seemed like somehow the blacklist file was already added as a dependency.
So the extra change in this patch is that I add deps to a set in clang-scan-deps
to eliminate duplicates and print in sorted order. Having a set achieves two purposes:
- Prints out the dependencies in sorted order
- Eliminates duplicates
An alternative fix to the test would have been to check only for the presence of
blacklsit file, but I didn't prefer it since explicit testing of all expected outputs
is better (and in this case has led us to capture duplicate outputs).