OLD | NEW |
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 Loading... |
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] Links all deps into a static library.\n"; |
| 374 const char kCompleteStaticLib_Help[] = |
| 375 "complete_static_lib: [boolean] Links all deps into a static library.\n" |
| 376 "\n" |
| 377 " A static library normally doesn't include code from dependencies, but\n" |
| 378 " instead forward the static libraries and source sets in its deps up\n" |
| 379 " the dependency chain until a linkable target (an executable or shared\n" |
| 380 " library) is reached. The final linkable target only links each static\n" |
| 381 " library once, even if it appears more than once in its dependency\n" |
| 382 " graph.\n" |
| 383 "\n" |
| 384 " In some cases the static library might be the final desired output.\n" |
| 385 " For example, you may be producing a static library for distribution to\n" |
| 386 " third parties. In this case, the static library should include code\n" |
| 387 " for all dependencies in one complete package.\n" |
| 388 "\n" |
| 389 "Example\n" |
| 390 "\n" |
| 391 " static_library(\"foo\") {\n" |
| 392 " complete_static_lib = true\n" |
| 393 " deps = [ \"bar\" ]\n" |
| 394 " }\n"; |
| 395 |
371 const char kConfigs[] = "configs"; | 396 const char kConfigs[] = "configs"; |
372 const char kConfigs_HelpShort[] = | 397 const char kConfigs_HelpShort[] = |
373 "configs: [label list] Configs applying to this target."; | 398 "configs: [label list] Configs applying to this target."; |
374 const char kConfigs_Help[] = | 399 const char kConfigs_Help[] = |
375 "configs: Configs applying to this target.\n" | 400 "configs: Configs applying to this target.\n" |
376 "\n" | 401 "\n" |
377 " A list of config labels.\n" | 402 " A list of config labels.\n" |
378 "\n" | 403 "\n" |
379 " The include_dirs, defines, etc. in each config are appended in the\n" | 404 " 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" | 405 " 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 Loading... |
911 if (info_map.empty()) { | 936 if (info_map.empty()) { |
912 INSERT_VARIABLE(AllDependentConfigs) | 937 INSERT_VARIABLE(AllDependentConfigs) |
913 INSERT_VARIABLE(AllowCircularIncludesFrom) | 938 INSERT_VARIABLE(AllowCircularIncludesFrom) |
914 INSERT_VARIABLE(Args) | 939 INSERT_VARIABLE(Args) |
915 INSERT_VARIABLE(Cflags) | 940 INSERT_VARIABLE(Cflags) |
916 INSERT_VARIABLE(CflagsC) | 941 INSERT_VARIABLE(CflagsC) |
917 INSERT_VARIABLE(CflagsCC) | 942 INSERT_VARIABLE(CflagsCC) |
918 INSERT_VARIABLE(CflagsObjC) | 943 INSERT_VARIABLE(CflagsObjC) |
919 INSERT_VARIABLE(CflagsObjCC) | 944 INSERT_VARIABLE(CflagsObjCC) |
920 INSERT_VARIABLE(CheckIncludes) | 945 INSERT_VARIABLE(CheckIncludes) |
| 946 INSERT_VARIABLE(CompleteStaticLib) |
921 INSERT_VARIABLE(Configs) | 947 INSERT_VARIABLE(Configs) |
922 INSERT_VARIABLE(Data) | 948 INSERT_VARIABLE(Data) |
923 INSERT_VARIABLE(Datadeps) | 949 INSERT_VARIABLE(Datadeps) |
924 INSERT_VARIABLE(Defines) | 950 INSERT_VARIABLE(Defines) |
925 INSERT_VARIABLE(Depfile) | 951 INSERT_VARIABLE(Depfile) |
926 INSERT_VARIABLE(Deps) | 952 INSERT_VARIABLE(Deps) |
927 INSERT_VARIABLE(DirectDependentConfigs) | 953 INSERT_VARIABLE(DirectDependentConfigs) |
928 INSERT_VARIABLE(ForwardDependentConfigsFrom) | 954 INSERT_VARIABLE(ForwardDependentConfigsFrom) |
929 INSERT_VARIABLE(IncludeDirs) | 955 INSERT_VARIABLE(IncludeDirs) |
930 INSERT_VARIABLE(Inputs) | 956 INSERT_VARIABLE(Inputs) |
931 INSERT_VARIABLE(Ldflags) | 957 INSERT_VARIABLE(Ldflags) |
932 INSERT_VARIABLE(Libs) | 958 INSERT_VARIABLE(Libs) |
933 INSERT_VARIABLE(LibDirs) | 959 INSERT_VARIABLE(LibDirs) |
934 INSERT_VARIABLE(OutputExtension) | 960 INSERT_VARIABLE(OutputExtension) |
935 INSERT_VARIABLE(OutputName) | 961 INSERT_VARIABLE(OutputName) |
936 INSERT_VARIABLE(Outputs) | 962 INSERT_VARIABLE(Outputs) |
937 INSERT_VARIABLE(Public) | 963 INSERT_VARIABLE(Public) |
938 INSERT_VARIABLE(Script) | 964 INSERT_VARIABLE(Script) |
939 INSERT_VARIABLE(Sources) | 965 INSERT_VARIABLE(Sources) |
940 INSERT_VARIABLE(Testonly) | 966 INSERT_VARIABLE(Testonly) |
941 INSERT_VARIABLE(Visibility) | 967 INSERT_VARIABLE(Visibility) |
942 } | 968 } |
943 return info_map; | 969 return info_map; |
944 } | 970 } |
945 | 971 |
946 #undef INSERT_VARIABLE | 972 #undef INSERT_VARIABLE |
947 | 973 |
948 } // namespace variables | 974 } // namespace variables |
OLD | NEW |