| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 " ...\n" | 368 " ...\n" |
| 369 " }\n"; | 369 " }\n"; |
| 370 | 370 |
| 371 const char kCompleteStaticLib[] = "complete_static_lib"; | 371 const char kCompleteStaticLib[] = "complete_static_lib"; |
| 372 const char kCompleteStaticLib_HelpShort[] = | 372 const char kCompleteStaticLib_HelpShort[] = |
| 373 "complete_static_lib: [boolean] Links all deps into a static library."; | 373 "complete_static_lib: [boolean] Links all deps into a static library."; |
| 374 const char kCompleteStaticLib_Help[] = | 374 const char kCompleteStaticLib_Help[] = |
| 375 "complete_static_lib: [boolean] Links all deps into a static library.\n" | 375 "complete_static_lib: [boolean] Links all deps into a static library.\n" |
| 376 "\n" | 376 "\n" |
| 377 " A static library normally doesn't include code from dependencies, but\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" | 378 " instead forwards the static libraries and source sets in its deps up\n" |
| 379 " the dependency chain until a linkable target (an executable or shared\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" | 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" | 381 " library once, even if it appears more than once in its dependency\n" |
| 382 " graph.\n" | 382 " graph.\n" |
| 383 "\n" | 383 "\n" |
| 384 " In some cases the static library might be the final desired output.\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" | 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" | 386 " third parties. In this case, the static library should include code\n" |
| 387 " for all dependencies in one complete package.\n" | 387 " for all dependencies in one complete package. Since GN does not unpack\n" |
| 388 " static libraries to forward their contents up the dependency chain,\n" |
| 389 " it is an error for complete static libraries to depend on other static\n" |
| 390 " libraries.\n" |
| 388 "\n" | 391 "\n" |
| 389 "Example\n" | 392 "Example\n" |
| 390 "\n" | 393 "\n" |
| 391 " static_library(\"foo\") {\n" | 394 " static_library(\"foo\") {\n" |
| 392 " complete_static_lib = true\n" | 395 " complete_static_lib = true\n" |
| 393 " deps = [ \"bar\" ]\n" | 396 " deps = [ \"bar\" ]\n" |
| 394 " }\n"; | 397 " }\n"; |
| 395 | 398 |
| 396 const char kConfigs[] = "configs"; | 399 const char kConfigs[] = "configs"; |
| 397 const char kConfigs_HelpShort[] = | 400 const char kConfigs_HelpShort[] = |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 INSERT_VARIABLE(Sources) | 1026 INSERT_VARIABLE(Sources) |
| 1024 INSERT_VARIABLE(Testonly) | 1027 INSERT_VARIABLE(Testonly) |
| 1025 INSERT_VARIABLE(Visibility) | 1028 INSERT_VARIABLE(Visibility) |
| 1026 } | 1029 } |
| 1027 return info_map; | 1030 return info_map; |
| 1028 } | 1031 } |
| 1029 | 1032 |
| 1030 #undef INSERT_VARIABLE | 1033 #undef INSERT_VARIABLE |
| 1031 | 1034 |
| 1032 } // namespace variables | 1035 } // namespace variables |
| OLD | NEW |