Use GN response files for devtools .grd

Eliminates the write_file call for making the debug devtools grd files by using a GN response file.

This was made more complicated by the GYP and GN response files having different formats, so it now supports two different arguments. Further, in the normal (non debugging devtools) case, the response file is empty which GN interprets as "don't use a response file" and things get confused. As a result, the file list argument to the script is now optional.

The script takes multiple categories of variable length files. This means that the normal OptionParser doesn't work well and I had to enhance the already complicated parsing.

Fixes a typo in a GN error message I noticed.

Review URL: https://codereview.chromium.org/1442013004

Cr-Original-Commit-Position: refs/heads/master@{#359634}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7cf73b7282dad450109b3eab2db79825cf03a4e0
1 file changed
tree: b97757a3f8f1041b95a78ee0379724d712fa7e0e
  1. tools/