Okay, Scott and I talked this through ...
In short, we should change the filter/api.py script to ignore the 'build_targets' param, and use just the 'targets' param
in the output; once we've done that, we should remove 'build_targets' altogether.
build_targets exists for two reasons:
1) in the belief that we might be able to shorten the list of targets passed to the compile when some targets are dependencies of others
2) to avoid potential weirdness that might arise if you pass in 'all' as part of the input 'targets' spec, in case you don't really want to build all.
Based on my calculations, we will probably never need to actually worry about #1; in the worst case, it's hard to picture the command line
exceeding 5000 chars, and up to 8000 should be safe. However, as we've discussed before, we can add response files to ninja if need be.
Scott added the code for 2) to work around cases where we were passing in 'all' to analyze but didn't really mean want all. We think at
this point such things should just be bugs that get fixed, and it's not clear if anyone will ever pass in 'all' now (it's possible to do so via
additional_compile_targets in the //buildbot/testing/*.json files, but no one seems to do so).
It seems clear that at this point having both 'targets' and 'build_targets' is just kinda confusing, and we think we don't need it (in fact,
in the GN implementation they always have the same values).
Scott, did I miss anything? Paweł, does that make sense?
-- Dirk