diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 19:31:36 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 19:31:36 +0000 |
commit | afb30e39c6791afed6cd12f085649400e4d80ae8 (patch) | |
tree | d70c0df0f227870789f6c5e9fdcb4e06de926f80 /tools/gn/function_set_defaults.cc | |
parent | db7cb05b956953a7868d6c4e359ead2f644965eb (diff) | |
download | chromium_src-afb30e39c6791afed6cd12f085649400e4d80ae8.zip chromium_src-afb30e39c6791afed6cd12f085649400e4d80ae8.tar.gz chromium_src-afb30e39c6791afed6cd12f085649400e4d80ae8.tar.bz2 |
Support private values in GN.
This adds special handling for variables that begin with underscores, which is inspired by Dart. Such variables are not imported when doing an import, which gives .gni files a way to have intermediate private variables that won't pollute the scopes of the files that include them.
This also applies to the root build config, which can have private values now.
Adds some missing unused variable checks. This was disabled because processing imports would mean all imported variables were unused, and files not using all of them would get unused variable errors. This adds the option to mark merged values on a scope as used, which is used for imported values.
BUG=341738
R=cjhopman@chromium.org
Review URL: https://codereview.chromium.org/287693002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271078 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/function_set_defaults.cc')
-rw-r--r-- | tools/gn/function_set_defaults.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gn/function_set_defaults.cc b/tools/gn/function_set_defaults.cc index ac61fe9..7851113 100644 --- a/tools/gn/function_set_defaults.cc +++ b/tools/gn/function_set_defaults.cc @@ -84,7 +84,7 @@ Value RunSetDefaults(Scope* scope, // Now copy the values set on the scope we made into the free-floating one // (with no containing scope) used to hold the target defaults. Scope* dest = scope->MakeTargetDefaults(target_type); - block_scope.NonRecursiveMergeTo(dest, false, function, + block_scope.NonRecursiveMergeTo(dest, Scope::MergeOptions(), function, "<SHOULD NOT FAIL>", err); return Value(); } |