Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: tools/gn/variables.cc

Issue 1868023002: Add GN output prefix override and allow empty output extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/variables.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/variables.h" 5 #include "tools/gn/variables.h"
6 6
7 namespace variables { 7 namespace variables {
8 8
9 // Built-in variables ---------------------------------------------------------- 9 // Built-in variables ----------------------------------------------------------
10 10
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 const char kOutputExtension_HelpShort[] = 1085 const char kOutputExtension_HelpShort[] =
1086 "output_extension: [string] Value to use for the output's file extension."; 1086 "output_extension: [string] Value to use for the output's file extension.";
1087 const char kOutputExtension_Help[] = 1087 const char kOutputExtension_Help[] =
1088 "output_extension: Value to use for the output's file extension.\n" 1088 "output_extension: Value to use for the output's file extension.\n"
1089 "\n" 1089 "\n"
1090 " Normally the file extension for a target is based on the target\n" 1090 " Normally the file extension for a target is based on the target\n"
1091 " type and the operating system, but in rare cases you will need to\n" 1091 " type and the operating system, but in rare cases you will need to\n"
1092 " override the name (for example to use \"libfreetype.so.6\" instead\n" 1092 " override the name (for example to use \"libfreetype.so.6\" instead\n"
1093 " of libfreetype.so on Linux).\n" 1093 " of libfreetype.so on Linux).\n"
1094 "\n" 1094 "\n"
1095 " This value should not include a leading dot. If undefined or empty,\n" 1095 " This value should not include a leading dot. If undefined, the default\n"
1096 " the default_output_extension specified on the tool will be used.\n" 1096 " specified on the tool will be used. If set to the empty string, no\n"
1097 " The output_extension will be used in the \"{{output_extension}}\"\n" 1097 " output extension will be used.\n"
1098 "\n"
1099 " The output_extension will be used to set the \"{{output_extension}}\"\n"
1098 " expansion which the linker tool will generally use to specify the\n" 1100 " expansion which the linker tool will generally use to specify the\n"
1099 " output file name. See \"gn help tool\".\n" 1101 " output file name. See \"gn help tool\".\n"
1100 "\n" 1102 "\n"
1101 "Example\n" 1103 "Example\n"
1102 "\n" 1104 "\n"
1103 " shared_library(\"freetype\") {\n" 1105 " shared_library(\"freetype\") {\n"
1104 " if (is_linux) {\n" 1106 " if (is_linux) {\n"
1105 " # Call the output \"libfreetype.so.6\"\n" 1107 " # Call the output \"libfreetype.so.6\"\n"
1106 " output_extension = \"so.6\"\n" 1108 " output_extension = \"so.6\"\n"
1107 " }\n" 1109 " }\n"
(...skipping 30 matching lines...) Expand all
1138 " to produce the file you want.\n" 1140 " to produce the file you want.\n"
1139 "\n" 1141 "\n"
1140 " This variable is valid for all binary output target types.\n" 1142 " This variable is valid for all binary output target types.\n"
1141 "\n" 1143 "\n"
1142 "Example\n" 1144 "Example\n"
1143 "\n" 1145 "\n"
1144 " static_library(\"doom_melon\") {\n" 1146 " static_library(\"doom_melon\") {\n"
1145 " output_name = \"fluffy_bunny\"\n" 1147 " output_name = \"fluffy_bunny\"\n"
1146 " }\n"; 1148 " }\n";
1147 1149
1150 const char kOutputPrefixOverride[] = "output_prefix_override";
1151 const char kOutputPrefixOverride_HelpShort[] =
1152 "output_prefix_override: [boolean] Don't use prefix for output name.";
1153 const char kOutputPrefixOverride_Help[] =
1154 "output_prefix_override: Don't use prefix for output name.\n"
1155 "\n"
1156 " A boolean that overrides the output prefix for a target. Defaults to\n"
1157 " false.\n"
1158 "\n"
1159 " Some systems use prefixes for the names of the final target output\n"
1160 " file. The normal example is \"libfoo.so\" on Linux for a target\n"
1161 " named \"foo\".\n"
1162 "\n"
1163 " The output prefix for a given target type is specified on the linker\n"
1164 " tool (see \"gn help tool\"). Sometimes this prefix is undesired.\n"
1165 "\n"
1166 " See also \"gn help output_extension\".\n"
1167 "\n"
1168 "Example\n"
1169 "\n"
1170 " shared_library(\"doom_melon\") {\n"
1171 " # Normally this will produce \"libdoom_melon.so\" on Linux, setting\n"
1172 " # Setting this flag will produce \"doom_melon.so\".\n"
1173 " output_prefix_override = true\n"
1174 " ...\n"
1175 " }\n";
1176
1148 const char kOutputs[] = "outputs"; 1177 const char kOutputs[] = "outputs";
1149 const char kOutputs_HelpShort[] = 1178 const char kOutputs_HelpShort[] =
1150 "outputs: [file list] Output files for actions and copy targets."; 1179 "outputs: [file list] Output files for actions and copy targets.";
1151 const char kOutputs_Help[] = 1180 const char kOutputs_Help[] =
1152 "outputs: Output files for actions and copy targets.\n" 1181 "outputs: Output files for actions and copy targets.\n"
1153 "\n" 1182 "\n"
1154 " Outputs is valid for \"copy\", \"action\", and \"action_foreach\"\n" 1183 " Outputs is valid for \"copy\", \"action\", and \"action_foreach\"\n"
1155 " target types and indicates the resulting files. Outputs must always\n" 1184 " target types and indicates the resulting files. Outputs must always\n"
1156 " refer to files in the build directory.\n" 1185 " refer to files in the build directory.\n"
1157 "\n" 1186 "\n"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 INSERT_VARIABLE(Defines) 1631 INSERT_VARIABLE(Defines)
1603 INSERT_VARIABLE(Depfile) 1632 INSERT_VARIABLE(Depfile)
1604 INSERT_VARIABLE(Deps) 1633 INSERT_VARIABLE(Deps)
1605 INSERT_VARIABLE(IncludeDirs) 1634 INSERT_VARIABLE(IncludeDirs)
1606 INSERT_VARIABLE(Inputs) 1635 INSERT_VARIABLE(Inputs)
1607 INSERT_VARIABLE(Ldflags) 1636 INSERT_VARIABLE(Ldflags)
1608 INSERT_VARIABLE(Libs) 1637 INSERT_VARIABLE(Libs)
1609 INSERT_VARIABLE(LibDirs) 1638 INSERT_VARIABLE(LibDirs)
1610 INSERT_VARIABLE(OutputExtension) 1639 INSERT_VARIABLE(OutputExtension)
1611 INSERT_VARIABLE(OutputName) 1640 INSERT_VARIABLE(OutputName)
1641 INSERT_VARIABLE(OutputPrefixOverride)
1612 INSERT_VARIABLE(Outputs) 1642 INSERT_VARIABLE(Outputs)
1613 INSERT_VARIABLE(PrecompiledHeader) 1643 INSERT_VARIABLE(PrecompiledHeader)
1614 INSERT_VARIABLE(PrecompiledSource) 1644 INSERT_VARIABLE(PrecompiledSource)
1615 INSERT_VARIABLE(Public) 1645 INSERT_VARIABLE(Public)
1616 INSERT_VARIABLE(PublicConfigs) 1646 INSERT_VARIABLE(PublicConfigs)
1617 INSERT_VARIABLE(PublicDeps) 1647 INSERT_VARIABLE(PublicDeps)
1618 INSERT_VARIABLE(ResponseFileContents) 1648 INSERT_VARIABLE(ResponseFileContents)
1619 INSERT_VARIABLE(Script) 1649 INSERT_VARIABLE(Script)
1620 INSERT_VARIABLE(Sources) 1650 INSERT_VARIABLE(Sources)
1621 INSERT_VARIABLE(Testonly) 1651 INSERT_VARIABLE(Testonly)
1622 INSERT_VARIABLE(Visibility) 1652 INSERT_VARIABLE(Visibility)
1623 INSERT_VARIABLE(WriteRuntimeDeps) 1653 INSERT_VARIABLE(WriteRuntimeDeps)
1624 } 1654 }
1625 return info_map; 1655 return info_map;
1626 } 1656 }
1627 1657
1628 #undef INSERT_VARIABLE 1658 #undef INSERT_VARIABLE
1629 1659
1630 } // namespace variables 1660 } // namespace variables
OLDNEW
« no previous file with comments | « tools/gn/variables.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698