GN args should not be implicitly global |
|||
Issue descriptionCurrently all arguments passed in "gn args" are global and are available in every file regardless of whether you've included the file that does declare_args() for it. This is confusing and should be changed to only apply at the ends of a declare_args() block. The tricky part will be to minimize locking when doing these lookups.
,
Jun 14 2016
,
Jun 17 2016
Can I work on this or is it already handled by someone else?
,
Jun 20 2016
@tim@rnc-ag.de - I don't think anyone else is actively working on this, so feel free to give it a shot.
,
Jul 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5662a8082448584fd3d77f0dba03759b2163e8e5 commit 5662a8082448584fd3d77f0dba03759b2163e8e5 Author: tim <tim@rnc-ag.de> Date: Tue Jul 12 00:07:46 2016 GN: Don't define argument overrides globally Previously, argument overrides (set via "gn args" or toolchain_args()) were global, even though their default values (set inside declare_args()) were set locally and thus only available to the file that set them, plus any file that imported it. Now, argument overrides are always applied locally, at the end of the declare_args() block. This ensures that argument defaults and overrides behave in the same way. BUG= 619963 Review-Url: https://codereview.chromium.org/2092623002 Cr-Commit-Position: refs/heads/master@{#404746} [modify] https://crrev.com/5662a8082448584fd3d77f0dba03759b2163e8e5/tools/gn/args.cc [modify] https://crrev.com/5662a8082448584fd3d77f0dba03759b2163e8e5/tools/gn/args.h [modify] https://crrev.com/5662a8082448584fd3d77f0dba03759b2163e8e5/tools/gn/args_unittest.cc
,
Jul 12 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by dpranke@chromium.org
, Jun 14 2016Labels: -Pri-3 OS-All Pri-2