0
Commit Graph

31 Commits

Author SHA1 Message Date
Peter Wen
29b80e84a0 lorenz: Switch to using gn_helpers
Hopefully this coupled with a build cache clean will be able to resolve
the issue on the lorenz bot.

Bug: 348423879
Change-Id: I840ab9c638c0cd1056528ab0ab2a26835f83371a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5698025
Auto-Submit: Peter Wen <wnwen@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1326380}
2024-07-11 20:57:23 +00:00
Michael Tang
6e80755bba Let gn_helper.CreateBuildCommand run from a non-current drive on Windows
This change replaces a usage of os.path.relpath with os.path.abspath
since finding a relative path between different drives on Windows is
not specified.

On Windows, os.path.relpath can throw a ValueError if the current
directory is not on the same drive as the parameter directory.
(see: https://docs.python.org/3/library/os.path.html#os.path.relpath).
This is normally fine since gn_helpers is usually run from the same
drive as the output directory. However, gn_helper_unittests calls
CreateBuildCommand with a temporary directory that is created on the C:
drive, which causes it to throw a ValueError if the current directory
is on a different drive (which is often, if the checkout itself is on a
different drive).

Change-Id: I70d77a6a9596195aef5b981ff56f15b3958dcccc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5667023
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Michael Tang <tangm@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1321137}
2024-06-28 19:39:07 +00:00
Henrique Nakashima
04c5b30b5b Fix siso path in gn_helpers.py
This should fix the breakage in lorenz-graph-dbg

Bug: 348423879
Change-Id: I5d14d8dffb717ad5e6cb7028e4347ec801a8c239
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5659539
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1320541}
2024-06-27 18:57:47 +00:00
Andrew Grieve
1230dc9c14 autosiso -> autoninja now that autosiso is no more.
Bug: b/293657720
Change-Id: I1292aa87a408bdc4d4388325690696e2286c191e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5017598
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1222703}
2023-11-10 02:16:05 +00:00
Peter Wen
e34515e76d Android: Avoid redirection through depot_tools
//third_party/depot_tools/ninja.py is unable to find the proper ninja
binary in //third_party/ninja/ninja on bots. Fix this by directly
referencing the correct binary.

Bug: 1469636
Change-Id: I9400b7c89bfb306bdfdbabe5bac4bdb72ea4ecda
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4761979
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1181137}
2023-08-08 20:33:49 +00:00
Andrew Grieve
7c9bc71c46 Select autosiso vs autoninja in rebuild_baselines.py & benchmark.py
Changes gn_helpers.CreateBuildCommand() to use autoninja when no
deps files are present so that scripts work for clean builds.

Bug: None
Change-Id: I5cb4dbb2c718f129ca3856ab66ec043870407956
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4675666
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1168903}
2023-07-11 19:54:40 +00:00
Andrew Grieve
911128ac37 Select autosiso vs autoninja in autotest.py and list_java_targets.py
Provides a gn_helpers.CreateBuildCommand(), which combines the logic
from these two scripts + chooses siso vs ninja.

Bug: None
Change-Id: Ib2ed396b4874495d622f7c78c751a3542c7c5568
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4675665
Reviewed-by: Peter Wen <wnwen@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1168244}
2023-07-10 19:06:42 +00:00
Avi Drissman
73a09d1a67 Update copyright headers in build/, build_overrides/, and buildtools/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

An earlier version of this CL, https://crrev.com/c/3879808,
was reverted due to an issue that was resolved with
https://crrev.com/c/3881211.

No-Try: true
Bug: 1098010
Change-Id: I91174ff0a9dd8b6dee79e6cba8209b614ce2b712
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3884220
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044745}
2022-09-08 20:33:38 +00:00
Rebekah Potter
184a820046 Revert "Update copyright headers in build/, build_overrides/, and buildtools/"
This reverts commit 8996d5a5ca.

Reason for revert: Breaks android-binary-size bot, see
https://bugs.chromium.org/p/chromium/issues/detail?id=1361092

Original change's description:
> Update copyright headers in build/, build_overrides/, and buildtools/
>
> The methodology used to generate this CL is documented in
> https://crbug.com/1098010#c21.
>
> No-Try: true
> Bug: 1098010
> Change-Id: I0323d0734081fc1aaf3b9ec3b8184411fe1a368a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3879808
> Auto-Submit: Avi Drissman <avi@chromium.org>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Owners-Override: Avi Drissman <avi@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1044227}

Bug: 1098010
Change-Id: Ie1b5a07d859e98588c1497220aac54834ea5d7f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3880816
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Nidhi Jaju <nidhijaju@chromium.org>
Commit-Queue: Nidhi Jaju <nidhijaju@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044284}
2022-09-08 01:08:54 +00:00
Avi Drissman
8996d5a5ca Update copyright headers in build/, build_overrides/, and buildtools/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c21.

No-Try: true
Bug: 1098010
Change-Id: I0323d0734081fc1aaf3b9ec3b8184411fe1a368a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3879808
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044227}
2022-09-07 22:46:30 +00:00
Sylvain Defresne
1ef2616e8d [ios] Ensure bots can pretty print $root_build_dir/args.gn
The downstream iOS bots import a gn file from $root_build_dir/args.gn
that contains nested scopes. Support to parse the file has been added
to //build/gn_helpers.py with https://crrev.com/c/2513217.

The next step on the bot is pretty printing the data parsed, which
fails as nested scopes are converted to nested dictionaries. This
CL adds support to pretty print those.

Bug: 1144711
Change-Id: I3130d493c6385f2016d91245e8a5f12e710495cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517679
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823627}
2020-11-03 18:35:16 +00:00
Sylvain Defresne
d84d24830e [gn] Ensure bots correctly parse $root_build_dir/args.gn
The downstream iOS bots import a gn file from $root_build_dir/args.gn
that would not be correctly parsed by //build/gn_helpers.py as:

1.  define some values of type scope (`{ a = "value"}`),
2.  it uses comments in many places (before all variables that are
    defined, above individual items in lists, ...).

To ensure that the file $root_build_dir/args.gn could be parsed, fix
//build/gn_helpers.py to support the scope values and to consider
comments as valid in any location where whitespace would have been.

Bug: 1144711
Change-Id: I0c48167f1bc818dc9f6253287c2c967d13756523
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513217
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823230}
2020-11-02 18:49:15 +00:00
Andrew Grieve
169e377d5b Reland "build_vars.txt: Changed to build_vars.json"
This reverts commit 67fc091c1c.

Reason for reland: Writing both build_vars.json & build_vars.txt

Original change's description:
> Revert "build_vars.txt: Changed to build_vars.json"
>
> This reverts commit 6e002e1f5d.
>
> Reason for revert: Official build failure crbug.com/1114609
>
> Original change's description:
> > build_vars.txt: Changed to build_vars.json
> >
> > And moved helper function into gn_helpers.py
> >
> > It was only ever in .properties format so that it
> > could be easily parsed by bash, but we no longer need
> > that.
> >
> > Also fixes default_android_sdk_version to be a string.
> > -next builds need it to be a string.
> >
> > Bug: None
> > Change-Id: I99541f18510de93dae4c0d68b734638564f74ee2
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2340673
> > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
> > Reviewed-by: Dirk Pranke <dpranke@google.com>
> > Cr-Commit-Position: refs/heads/master@{#796020}
>
> TBR=dpranke@google.com,agrieve@chromium.org,mheikal@chromium.org
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: None
> Change-Id: Iad8597f6af00c534245fd1a40d1809d952758f47
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2344626
> Reviewed-by: Ben Mason <benmason@chromium.org>
> Commit-Queue: Ben Mason <benmason@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#796387}

Bug: 1114750
Change-Id: I1019351a294e54701c093911f67a1fb6b7bd34d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2346965
Reviewed-by: Ben Mason <benmason@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796456}
2020-08-10 18:12:14 +00:00
Ben Mason
67fc091c1c Revert "build_vars.txt: Changed to build_vars.json"
This reverts commit 6e002e1f5d.

Reason for revert: Official build failure crbug.com/1114609

Original change's description:
> build_vars.txt: Changed to build_vars.json
> 
> And moved helper function into gn_helpers.py
> 
> It was only ever in .properties format so that it
> could be easily parsed by bash, but we no longer need
> that.
> 
> Also fixes default_android_sdk_version to be a string.
> -next builds need it to be a string.
> 
> Bug: None
> Change-Id: I99541f18510de93dae4c0d68b734638564f74ee2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2340673
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Cr-Commit-Position: refs/heads/master@{#796020}

TBR=dpranke@google.com,agrieve@chromium.org,mheikal@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: None
Change-Id: Iad8597f6af00c534245fd1a40d1809d952758f47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2344626
Reviewed-by: Ben Mason <benmason@chromium.org>
Commit-Queue: Ben Mason <benmason@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796387}
2020-08-10 14:48:33 +00:00
Andrew Grieve
6e002e1f5d build_vars.txt: Changed to build_vars.json
And moved helper function into gn_helpers.py

It was only ever in .properties format so that it
could be easily parsed by bash, but we no longer need
that.

Also fixes default_android_sdk_version to be a string.
-next builds need it to be a string.

Bug: None
Change-Id: I99541f18510de93dae4c0d68b734638564f74ee2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2340673
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#796020}
2020-08-07 18:42:21 +00:00
Samuel Huang
007ab8b872 [Build] gn_helpers.py: ToGNString(): Add option for pretty print.
ToGNString() in gn_helpers.py prints (nested) lists as a one-liners.
This can create every long lines, which are difficult to diff across
versions. This CL reimpements ToGNString(), and adds a "pretty" option
to print list each leaf elements on a separate line, with indent.
Details:
* Keep pretty print off by default, and preserve existing output.
  * Reason: ToGNString() outputs may be committed into code base. We
    want each caller to make its own decisions regarding pretty print.
* Allow new line to appear in string (GN expresses this as "$0x0A").
* Fix Unicode representation (after UTF-8 encoding need "$0xXX").
* Add stricter checks for GN identifiers for {'identifier': 'value'}.
* gn_helpers_unittest.py:
  * Add many more tests, for outputs without and with pretty print.
  * Make script compatible with Python 2 and Python 3.

Bug: 1074446
Change-Id: I7a5e0174bdebf8bfb03cdcf42aed7c26ae56f120
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2231505
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#775776}
2020-06-05 21:44:34 +00:00
Ben Pastene
b75f8eca53 gn_helpers: Correctly handle comments followed by whitespace lines.
Without the fix, the modified unittest fails with:
"GNError: Expected an identifier"

With the fix, the unittest passes.

Bug: 1091082, 937821
Change-Id: I32591c64945dd918dfc341c8327fd530058b90ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2231286
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#775299}
2020-06-04 22:09:28 +00:00
Ben Pastene
b52227fdc9 gn_helpers: Allow the checkout root to be passed in.
Will be used by clients that have a vendored copy of the lib:
https://source.chromium.org/chromiumos/chromiumos/codesearch/+/master:chromite/third_party/gn_helpers/

Bug: 937821
Change-Id: I6f2380fe60fe5bdc661bcbf7947bf3e221011e9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225264
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773877}
2020-06-01 22:41:30 +00:00
Samuel Huang
1ea5180e37 [Build] Fix lint warnings for Python functions to extract .info files from .aar.
The following Python functions are directly involved in extracting .info
files from .aar:
* gn_helpers.py: ToGNString().
* aar.py: _IsManifestEmpty().
* aar.py: _CreateInfo().

We wish to port these files to Google3 to enable .info file extraction
(while keeping the Chromium versions around for verification). However,
these functions produce many Python lint warnings in Google3. This CL
fixes these warnings in Chromium first, and improve comments.

Change-Id: I2a826f70ac1d15f2f358195327fd0dd3f12db5fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2213206
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771582}
2020-05-25 16:29:40 +00:00
Ben Pastene
00156a211e gn_helpers: Add support for imported args files.
The libassistant build calls gn_helpers to read the out dir's args.gn
file (while it's being invoked by ninja, mind you!) and passes its
contents through gn_helpers, applies a filtering, then creates a sub
build dir (within the original build dir) using its modified set of GN
args.

This is problematic since crbug.com/937821 is trying to transition
CrOS bots to using import() lines in their args file, which breaks
libassistant's build.

This fixes that by adding import support to gn_helpers.

Bug: 937821
Change-Id: I790bc27368611f31b63a0135c0e5919f35b21e6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2107709
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752503}
2020-03-23 18:13:10 +00:00
Raul Tambre
4197d3af6e Improve Python 3 support in build scripts
The changes are to allow build files to be generated using Python 3 on Windows.

The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 941669
Change-Id: I52c912c624660c7a46c05f8f36871744abd7b8d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1521487
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
Cr-Commit-Position: refs/heads/master@{#641870}
2019-03-19 15:04:20 +00:00
Ben Pastene
9b24d85070 Make gn_helpers.py safely ignore comments.
I'd like to add comments to the GN args of some bots. This will let us
do that without mb or simplechrome SDK crashing.

Bug: 901471
Change-Id: I7f49434e02591639a02ef9cfd0f026680f6b9de1
Reviewed-on: https://chromium-review.googlesource.com/c/1318188
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605544}
2018-11-06 00:42:09 +00:00
Julien Brianceau
96dfe4d804 build: Fix common misspellings
Bug: 750830
Change-Id: Ie4cc9f02e3cc23f0ed3e44b5372745eee9944165
Reviewed-on: https://chromium-review.googlesource.com/594770
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Julien Brianceau <jbriance@cisco.com>
Cr-Commit-Position: refs/heads/master@{#490922}
2017-08-01 09:03:13 +00:00
yyanagisawa
18ef930c63 Fix pylint warnings: build/gn_helpers.py
************* Module gn_helpers
W: 68,17: Redefining built-in 'input' (redefined-builtin)
W:108,15: Redefining built-in 'input' (redefined-builtin)
W:242, 4: Redefining built-in 'id' (redefined-builtin)

Review-Url: https://codereview.chromium.org/2389353004
Cr-Commit-Position: refs/heads/master@{#423785}
2016-10-07 02:37:56 +00:00
dpranke
eca4a786d1 Switch MB to write the GN args to args.gn.
This CL switches MB from passing the gn arguments on the
command line via --args to actually writing them to an
args.gn file. This makes some of the escaping slightly cleaner
and also will enable us to embed import() lines in a follow-on
CL, so that we can use //build/args templates.

R=brettw@chromium.org
BUG=602528

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

Cr-Commit-Position: refs/heads/master@{#387205}
2016-04-14 01:44:13 +00:00
dpranke
65d84dc0f6 Add FromGNArgs() to gn_helpers.
This adds a method to convert a string containing a list of
gn --args -like assignments to a python dict.

(ToGNString() already supports the opposite direction).

R=brettw@chromium.org, hashimoto@chromium.org
BUG=561142

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

Cr-Commit-Position: refs/heads/master@{#385336}
2016-04-06 00:10:38 +00:00
hashimoto
7bf1d0a550 Let gn_helpers.py handle unicode as str
For some reason, cros_chrome_sdk_unittests passes values as a unicode
object, instead of a str.

BUG=561142

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

Cr-Commit-Position: refs/heads/master@{#384839}
2016-04-04 01:03:19 +00:00
dpranke
e031ec2442 Fix gn_helpers' parsing of bools.
R=brettw@chromium.org
BUG=561142

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

Cr-Commit-Position: refs/heads/master@{#384752}
2016-04-02 00:18:53 +00:00
brettw
81687d8362 Use gn_helpers to deserialize GN lists.
The Android build code doesn't properly unescape the GN lists, use the official Python GN parser instead of ast for the zip script.

Document what should be done for build_utils, but don't fix it due to cast shell build errors as explained in the comment I added.

Update mojo zip script to use the gn helpers.

BUG=573132, 571022

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

Cr-Commit-Position: refs/heads/master@{#372461}
2016-01-29 23:23:56 +00:00
brettw
9dffb54bc4 Add a Python parser for GN types to gn_helpers.
Some scripts take serialized GN values including strings and lists. These are serialized and escaped according to GN rules. In particular, the string escaping is not possible to duplicate with Python's "ast" module. This simple parser will convert values properly.

Add unit tests for new code, as well as existing code in gn_helpers.

Fix omissions in existing ToGNString code.

BUG=573132,571022

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

Cr-Commit-Position: refs/heads/master@{#371000}
2016-01-22 18:42:46 +00:00
brettw@chromium.org
530bf7e81f Add support for reading .gypi files.
Adds support for a new value type, a dictionary. To script it looks the same as a scope, but the existing scope didn't have the right memory management semantics for this.

Adds a new input conversion mode to interpret the result of a script as a GN block (basically an eval) and get the result in a dictionary. This allows returning named sets of things from a script. Updates the accessor and defined stuff to work with this new type.

Adds some features to the input file manager so that when we do dynamic reading from a script we keep the text of the read around which means we can give proper errors that refer to the script output, and don't have to do the weird recursive set origin thing to clear out the pointers that became invalid when the InputFile went out of scope.

This allows us to give better error messages when parsing input. The error handling in the input conversion code is changed accordingly.

Checks for unused variables both in code that instantiates a template, and in the template code itself.

Adds a shared python script for outputting values from Python to GN.

Adds a python script to read .gypi files and return the value as a GN scope.

BUG=
R=dpranke@chromium.org, scottmg@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262045 0039d316-1c4b-4281-b951-d872f2087c98
2014-04-06 04:35:10 +00:00