gn: make gn gen preserve import statements passed in --args

Previously, gn gen would expand all imports and only record the final
arg keyvalue pairs in args.gn, if called as gn gen --args='import...'.

Now the actual import statement will be recorded. This allows avoiding
a manual args.gn edit of you want an actual import statement there, for
example if the imported gni houses a predefined set of default args
that you want to follow, and want to re-gn when it changes.

R=brettw@chromium.org,dpranke@chromium.org
BUG=588513

Review-Url: https://codereview.chromium.org/2250623004
Cr-Original-Commit-Position: refs/heads/master@{#412687}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9f58d6d943aa2c6bd32be6dbe85a130b8c75efe5
4 files changed
tree: 9bc4df720c18a75879c9aa55f68a824cf7fa5677
  1. tools/