diff options
author | Brett Wilson <brettw@chromium.org> | 2014-08-28 16:35:28 -0700 |
---|---|---|
committer | Brett Wilson <brettw@chromium.org> | 2014-08-28 23:36:31 +0000 |
commit | 60a5bf4a8a5d1a2dad8e7a67f81e72756e886266 (patch) | |
tree | e9d6987dbe7e321e6aead28fa4565b2e256c5ec4 /tools/gn/variables.cc | |
parent | 9ec7198631c65b058993de4ff23c7e8c04aec9d8 (diff) | |
download | chromium_src-60a5bf4a8a5d1a2dad8e7a67f81e72756e886266.zip chromium_src-60a5bf4a8a5d1a2dad8e7a67f81e72756e886266.tar.gz chromium_src-60a5bf4a8a5d1a2dad8e7a67f81e72756e886266.tar.bz2 |
Remove built-in component and test targets from GN.
Previously "component" was a built-in function that forwarded to source_set, static_library, or shared_library depending on the value of component_mode. And test was a built-in function that forwarded to executable.
These can be expressed as templates instead. This patch removes the built-in versions and implements the templates in the master build config file.
Forwarding all of the variables for these is somewhat tedious, but I still prefer not to add a new concept for this, since it will be rarely used and less clear what is happening.
With the updated BUILDCONFIG.gn file, the build will work with both the old and new GN version (the built-in version of component and test take precedence). When the new GN binary is pushed, we can remove the references to component_mode.
BUG=
R=hclam@chromium.org
Review URL: https://codereview.chromium.org/516703005
Cr-Commit-Position: refs/heads/master@{#292500}
Diffstat (limited to 'tools/gn/variables.cc')
-rw-r--r-- | tools/gn/variables.cc | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/tools/gn/variables.cc b/tools/gn/variables.cc index 5c67038..ccc5a00 100644 --- a/tools/gn/variables.cc +++ b/tools/gn/variables.cc @@ -8,25 +8,6 @@ namespace variables { // Built-in variables ---------------------------------------------------------- -const char kComponentMode[] = "component_mode"; -const char kComponentMode_HelpShort[] = - "component_mode: [string] Specifies the meaning of the component() call."; -const char kComponentMode_Help[] = - "component_mode: Specifies the meaning of the component() call.\n" - "\n" - " This value is looked up whenever a \"component\" target type is\n" - " encountered. The value controls whether the given target is a shared\n" - " or a static library.\n" - "\n" - " The initial value will be empty, which will cause a call to\n" - " component() to throw an error. Typically this value will be set in the\n" - " build config script.\n" - "\n" - "Possible values:\n" - " - \"shared_library\"\n" - " - \"source_set\"\n" - " - \"static_library\"\n"; - const char kCpuArch[] = "cpu_arch"; const char kCpuArch_HelpShort[] = "cpu_arch: [string] Current processor architecture."; @@ -845,7 +826,6 @@ const VariableInfoMap& GetBuiltinVariables() { INSERT_VARIABLE(BuildCpuArch) INSERT_VARIABLE(BuildOs) INSERT_VARIABLE(CpuArch) - INSERT_VARIABLE(ComponentMode) INSERT_VARIABLE(CurrentToolchain) INSERT_VARIABLE(DefaultToolchain) INSERT_VARIABLE(Os) |