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

Unified Diff: tools/gn/variables.cc

Issue 1904473002: Add arflags to GN (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/variables.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/variables.cc
diff --git a/tools/gn/variables.cc b/tools/gn/variables.cc
index 46cd57edabfe3219efa2cee8bd9f323b812ccd48..dc0316b45134f1101dafda6cfd26118d1880d1bd 100644
--- a/tools/gn/variables.cc
+++ b/tools/gn/variables.cc
@@ -418,6 +418,25 @@ const char kAllowCircularIncludesFrom_Help[] =
" public_deps = [ \":c\" ]\n"
" }\n";
+const char kArflags[] = "arflags";
+const char kArflags_HelpShort[] =
+ "arflags: [string list] Arguments passed to static_library archiver.";
+const char kArflags_Help[] =
+ "arflags: Arguments passed to static_library archiver.\n"
+ "\n"
+ " A list of flags passed to the archive/lib command that creates static\n"
+ " libraries.\n"
+ "\n"
+ " arflags are NOT pushed to dependents, so applying arflags to source\n"
+ " sets or any other target type will be a no-op. As with ldflags,\n"
+ " you could put the arflags in a config and set that as a public or\n"
+ " \"all dependent\" config, but that will likely not be what you want.\n"
+ " If you have a chain of static libraries dependent on each other,\n"
+ " this can cause the flags to propagate up to other static libraries.\n"
+ " Due to the nature of how arflags are typically used, you will normally\n"
+ " want to apply them directly on static_library targets themselves.\n"
+ COMMON_ORDERING_HELP;
+
const char kArgs[] = "args";
const char kArgs_HelpShort[] =
"args: [string list] Arguments passed to an action.";
@@ -1638,6 +1657,7 @@ const VariableInfoMap& GetTargetVariables() {
if (info_map.empty()) {
INSERT_VARIABLE(AllDependentConfigs)
INSERT_VARIABLE(AllowCircularIncludesFrom)
+ INSERT_VARIABLE(Arflags)
INSERT_VARIABLE(Args)
INSERT_VARIABLE(Asmflags)
INSERT_VARIABLE(AssertNoDeps)
« 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