When a source file fails to be compiled to the targeted object file, the root cause could be:
* The source file itself or included header files lead to breakage.
* Compile flag changes in gn file.
* Bot temporary failure.
A possible heuristic is: given that obj/path/to/target.o failed, do the followings.
1. Get its deps by "ninja -t deps obj/path/to/target.o". This would include the source path/to/target.cc and all the header files it depends on directly or indirectly.
2. Get the whole build graph by "ninja -t graph".
3. Use the build graph to replace any generated header file with those original files in the git repo that it depends on.
4. With the adjusted deps, reduce the regression range to only one or just a couple of commits that touch any of the dep.
Comment 1 by st...@chromium.org
, Apr 17 2017