Adjust the way GN resolves command line args into files or labels.
Previously, given a command line argument that could legally be either a
file or a label, we would check to see if it was a label first. If the
arg happened to be a filename containing parentheses, this would result
in an error complaining about an unrecognized toolchain.
Now we check to see if the arg refers to an existing file first. If
the arg does not refer to an existing file, we attempt to resolve
it as a label, and only after we fail to match it as a label to we
fall back to treating it as a (non-existent) file again. This means
that we'll still give errors on filenames that contain parentheses
that don't exist, but hopefully that happens less often.
R=brettw@chromium.org
BUG=485386
Review URL: https://codereview.chromium.org/
1123353005
Cr-Commit-Position: refs/heads/master@{#328846}