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

Unified Diff: tools/gn/variables.cc

Issue 565283002: GN: Add notion of 'complete' static libraries, akin to GYP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually added the variable now Created 6 years, 3 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
« tools/gn/target.cc ('K') | « 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 af75aef874eb97891a8ca3e5c10ae88bdc4d7f1e..6e034e3c1d95668efed3c71e5438b43c326c5930 100644
--- a/tools/gn/variables.cc
+++ b/tools/gn/variables.cc
@@ -368,6 +368,24 @@ const char kCheckIncludes_Help[] =
" ...\n"
" }\n";
+const char kCompleteStaticLib[] = "complete_static_lib";
+const char kCompleteStaticLib_HelpShort[] =
+ "complete_static_lib: [boolean] Actually link this static library target";
+const char kCompleteStaticLib_Help[] =
+ "complete_static_lib: [boolean] Actually link this static library target\n"
+ "\n"
+ " Static libraries are normally treated roughly like source_sets, in\n"
brettw 2014/09/12 20:53:33 I don't like defining static libraries in terms of
Chris Masone 2014/09/12 22:56:37 Done.
+ " that they are mostly just a way to group objects that are then linked\n"
+ " into any upstream linkable targets (generally, executables and shared\n"
+ " libraries). This is to avoid duplication in cases where multiple\n"
+ " static libraries depend on the same target. This flag allows a given\n"
+ " static library target to be explicitly made linkable.\n"
+ "\n"
+ "Example:\n"
brettw 2014/09/12 20:53:34 I've been doing no colon and a blank line after th
Chris Masone 2014/09/12 22:56:37 Done.
+ " static_library(\"foo\") {\n"
+ " complete_static_lib = true # Force foo to.\n"
brettw 2014/09/12 20:53:33 Delete comment. And maybe add a line with deps tha
Chris Masone 2014/09/12 22:56:37 Done.
+ " }\n";
+
const char kConfigs[] = "configs";
const char kConfigs_HelpShort[] =
"configs: [label list] Configs applying to this target.";
@@ -918,6 +936,7 @@ const VariableInfoMap& GetTargetVariables() {
INSERT_VARIABLE(CflagsObjC)
INSERT_VARIABLE(CflagsObjCC)
INSERT_VARIABLE(CheckIncludes)
+ INSERT_VARIABLE(CompleteStaticLib)
INSERT_VARIABLE(Configs)
INSERT_VARIABLE(Data)
INSERT_VARIABLE(Datadeps)
« tools/gn/target.cc ('K') | « tools/gn/variables.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698