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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
657 " A static library normally doesn't include code from dependencies, but\n" | 657 " A static library normally doesn't include code from dependencies, but\n" |
658 " instead forwards the static libraries and source sets in its deps up\n" | 658 " instead forwards the static libraries and source sets in its deps up\n" |
659 " the dependency chain until a linkable target (an executable or shared\n" | 659 " the dependency chain until a linkable target (an executable or shared\n" |
660 " library) is reached. The final linkable target only links each static\n" | 660 " library) is reached. The final linkable target only links each static\n" |
661 " library once, even if it appears more than once in its dependency\n" | 661 " library once, even if it appears more than once in its dependency\n" |
662 " graph.\n" | 662 " graph.\n" |
663 "\n" | 663 "\n" |
664 " In some cases the static library might be the final desired output.\n" | 664 " In some cases the static library might be the final desired output.\n" |
665 " For example, you may be producing a static library for distribution to\n" | 665 " For example, you may be producing a static library for distribution to\n" |
666 " third parties. In this case, the static library should include code\n" | 666 " third parties. In this case, the static library should include code\n" |
667 " for all dependencies in one complete package. Since GN does not unpack\n" | 667 " for all dependencies in one complete package. However, complete static\n" |
668 " static libraries to forward their contents up the dependency chain,\n" | 668 " libraries themselves are never linked into other complete static\n" |
669 " it is an error for complete static libraries to depend on other static\n" | 669 " libraries. All complete static libraries are for distribution and\n" |
670 " linking them in would cause code duplication in this case. If the\n" | |
671 " static library is not for distribution, it should not be complete.\n" | |
670 "\n" | 672 "\n" |
671 " In rare cases it makes sense to list a header in more than one\n" | 673 " In rare cases it makes sense to list a header in more than one\n" |
brettw
2016/04/21 20:47:00
Can you add a new paragraph here on the "promotion
| |
672 " target if it could be considered conceptually a member of both.\n" | 674 " target if it could be considered conceptually a member of both.\n" |
673 " libraries.\n" | 675 " libraries.\n" |
674 "\n" | 676 "\n" |
675 "Example\n" | 677 "Example\n" |
676 "\n" | 678 "\n" |
677 " static_library(\"foo\") {\n" | 679 " static_library(\"foo\") {\n" |
678 " complete_static_lib = true\n" | 680 " complete_static_lib = true\n" |
679 " deps = [ \"bar\" ]\n" | 681 " deps = [ \"bar\" ]\n" |
680 " }\n"; | 682 " }\n"; |
681 | 683 |
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1700 INSERT_VARIABLE(Testonly) | 1702 INSERT_VARIABLE(Testonly) |
1701 INSERT_VARIABLE(Visibility) | 1703 INSERT_VARIABLE(Visibility) |
1702 INSERT_VARIABLE(WriteRuntimeDeps) | 1704 INSERT_VARIABLE(WriteRuntimeDeps) |
1703 } | 1705 } |
1704 return info_map; | 1706 return info_map; |
1705 } | 1707 } |
1706 | 1708 |
1707 #undef INSERT_VARIABLE | 1709 #undef INSERT_VARIABLE |
1708 | 1710 |
1709 } // namespace variables | 1711 } // namespace variables |
OLD | NEW |