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

Side by Side 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 unified diff | Download patch
« tools/gn/target.cc ('K') | « 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 " it just skips checking the includes of the current target's files.\n" 361 " it just skips checking the includes of the current target's files.\n"
362 "\n" 362 "\n"
363 "Example\n" 363 "Example\n"
364 "\n" 364 "\n"
365 " source_set(\"busted_includes\") {\n" 365 " source_set(\"busted_includes\") {\n"
366 " # This target's includes are messed up, exclude it from checking.\n" 366 " # This target's includes are messed up, exclude it from checking.\n"
367 " check_includes = false\n" 367 " check_includes = false\n"
368 " ...\n" 368 " ...\n"
369 " }\n"; 369 " }\n";
370 370
371 const char kCompleteStaticLib[] = "complete_static_lib";
372 const char kCompleteStaticLib_HelpShort[] =
373 "complete_static_lib: [boolean] Actually link this static library target";
374 const char kCompleteStaticLib_Help[] =
375 "complete_static_lib: [boolean] Actually link this static library target\n"
376 "\n"
377 " 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.
378 " that they are mostly just a way to group objects that are then linked\n"
379 " into any upstream linkable targets (generally, executables and shared\n"
380 " libraries). This is to avoid duplication in cases where multiple\n"
381 " static libraries depend on the same target. This flag allows a given\n"
382 " static library target to be explicitly made linkable.\n"
383 "\n"
384 "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.
385 " static_library(\"foo\") {\n"
386 " 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.
387 " }\n";
388
371 const char kConfigs[] = "configs"; 389 const char kConfigs[] = "configs";
372 const char kConfigs_HelpShort[] = 390 const char kConfigs_HelpShort[] =
373 "configs: [label list] Configs applying to this target."; 391 "configs: [label list] Configs applying to this target.";
374 const char kConfigs_Help[] = 392 const char kConfigs_Help[] =
375 "configs: Configs applying to this target.\n" 393 "configs: Configs applying to this target.\n"
376 "\n" 394 "\n"
377 " A list of config labels.\n" 395 " A list of config labels.\n"
378 "\n" 396 "\n"
379 " The include_dirs, defines, etc. in each config are appended in the\n" 397 " The include_dirs, defines, etc. in each config are appended in the\n"
380 " order they appear to the compile command for each file in the target.\n" 398 " order they appear to the compile command for each file in the target.\n"
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 if (info_map.empty()) { 929 if (info_map.empty()) {
912 INSERT_VARIABLE(AllDependentConfigs) 930 INSERT_VARIABLE(AllDependentConfigs)
913 INSERT_VARIABLE(AllowCircularIncludesFrom) 931 INSERT_VARIABLE(AllowCircularIncludesFrom)
914 INSERT_VARIABLE(Args) 932 INSERT_VARIABLE(Args)
915 INSERT_VARIABLE(Cflags) 933 INSERT_VARIABLE(Cflags)
916 INSERT_VARIABLE(CflagsC) 934 INSERT_VARIABLE(CflagsC)
917 INSERT_VARIABLE(CflagsCC) 935 INSERT_VARIABLE(CflagsCC)
918 INSERT_VARIABLE(CflagsObjC) 936 INSERT_VARIABLE(CflagsObjC)
919 INSERT_VARIABLE(CflagsObjCC) 937 INSERT_VARIABLE(CflagsObjCC)
920 INSERT_VARIABLE(CheckIncludes) 938 INSERT_VARIABLE(CheckIncludes)
939 INSERT_VARIABLE(CompleteStaticLib)
921 INSERT_VARIABLE(Configs) 940 INSERT_VARIABLE(Configs)
922 INSERT_VARIABLE(Data) 941 INSERT_VARIABLE(Data)
923 INSERT_VARIABLE(Datadeps) 942 INSERT_VARIABLE(Datadeps)
924 INSERT_VARIABLE(Defines) 943 INSERT_VARIABLE(Defines)
925 INSERT_VARIABLE(Depfile) 944 INSERT_VARIABLE(Depfile)
926 INSERT_VARIABLE(Deps) 945 INSERT_VARIABLE(Deps)
927 INSERT_VARIABLE(DirectDependentConfigs) 946 INSERT_VARIABLE(DirectDependentConfigs)
928 INSERT_VARIABLE(ForwardDependentConfigsFrom) 947 INSERT_VARIABLE(ForwardDependentConfigsFrom)
929 INSERT_VARIABLE(IncludeDirs) 948 INSERT_VARIABLE(IncludeDirs)
930 INSERT_VARIABLE(Inputs) 949 INSERT_VARIABLE(Inputs)
931 INSERT_VARIABLE(Ldflags) 950 INSERT_VARIABLE(Ldflags)
932 INSERT_VARIABLE(Libs) 951 INSERT_VARIABLE(Libs)
933 INSERT_VARIABLE(LibDirs) 952 INSERT_VARIABLE(LibDirs)
934 INSERT_VARIABLE(OutputExtension) 953 INSERT_VARIABLE(OutputExtension)
935 INSERT_VARIABLE(OutputName) 954 INSERT_VARIABLE(OutputName)
936 INSERT_VARIABLE(Outputs) 955 INSERT_VARIABLE(Outputs)
937 INSERT_VARIABLE(Public) 956 INSERT_VARIABLE(Public)
938 INSERT_VARIABLE(Script) 957 INSERT_VARIABLE(Script)
939 INSERT_VARIABLE(Sources) 958 INSERT_VARIABLE(Sources)
940 INSERT_VARIABLE(Testonly) 959 INSERT_VARIABLE(Testonly)
941 INSERT_VARIABLE(Visibility) 960 INSERT_VARIABLE(Visibility)
942 } 961 }
943 return info_map; 962 return info_map;
944 } 963 }
945 964
946 #undef INSERT_VARIABLE 965 #undef INSERT_VARIABLE
947 966
948 } // namespace variables 967 } // namespace variables
OLDNEW
« 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