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" |
| 672 "\n" |
| 673 " GN treats non-complete static libraries as source sets when they are\n" |
| 674 " linked into complete static libraries. This is done because some tools\n" |
| 675 " like AR do not handle dependent static libraries properly. This makes\n" |
| 676 " it easier to write \"alink\" rules.\n" |
670 "\n" | 677 "\n" |
671 " In rare cases it makes sense to list a header in more than one\n" | 678 " In rare cases it makes sense to list a header in more than one\n" |
672 " target if it could be considered conceptually a member of both.\n" | 679 " target if it could be considered conceptually a member of both.\n" |
673 " libraries.\n" | 680 " libraries.\n" |
674 "\n" | 681 "\n" |
675 "Example\n" | 682 "Example\n" |
676 "\n" | 683 "\n" |
677 " static_library(\"foo\") {\n" | 684 " static_library(\"foo\") {\n" |
678 " complete_static_lib = true\n" | 685 " complete_static_lib = true\n" |
679 " deps = [ \"bar\" ]\n" | 686 " deps = [ \"bar\" ]\n" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 " config(\"default_optimization\") {\n" | 756 " config(\"default_optimization\") {\n" |
750 " if (optimize_everything) {\n" | 757 " if (optimize_everything) {\n" |
751 " configs = [ \":super_optimization\" ]\n" | 758 " configs = [ \":super_optimization\" ]\n" |
752 " } else {\n" | 759 " } else {\n" |
753 " configs = [ \":no_optimization\" ]\n" | 760 " configs = [ \":no_optimization\" ]\n" |
754 " }\n" | 761 " }\n" |
755 " }\n"; | 762 " }\n"; |
756 | 763 |
757 const char kConsole[] = "console"; | 764 const char kConsole[] = "console"; |
758 const char kConsole_HelpShort[] = | 765 const char kConsole_HelpShort[] = |
759 "console [boolean]: Run this action in the console pool."; | 766 "console: [boolean] Run this action in the console pool."; |
760 const char kConsole_Help[] = | 767 const char kConsole_Help[] = |
761 "console: Run this action in the console pool.\n" | 768 "console: Run this action in the console pool.\n" |
762 "\n" | 769 "\n" |
763 " Boolean. Defaults to false.\n" | 770 " Boolean. Defaults to false.\n" |
764 "\n" | 771 "\n" |
765 " Actions marked \"console = true\" will be run in the built-in ninja\n" | 772 " Actions marked \"console = true\" will be run in the built-in ninja\n" |
766 " \"console\" pool. They will have access to real stdin and stdout, and\n" | 773 " \"console\" pool. They will have access to real stdin and stdout, and\n" |
767 " output will not be buffered by ninja. This can be useful for\n" | 774 " output will not be buffered by ninja. This can be useful for\n" |
768 " long-running actions with progress logs, or actions that require user \n" | 775 " long-running actions with progress logs, or actions that require user \n" |
769 " input.\n" | 776 " input.\n" |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1700 INSERT_VARIABLE(Testonly) | 1707 INSERT_VARIABLE(Testonly) |
1701 INSERT_VARIABLE(Visibility) | 1708 INSERT_VARIABLE(Visibility) |
1702 INSERT_VARIABLE(WriteRuntimeDeps) | 1709 INSERT_VARIABLE(WriteRuntimeDeps) |
1703 } | 1710 } |
1704 return info_map; | 1711 return info_map; |
1705 } | 1712 } |
1706 | 1713 |
1707 #undef INSERT_VARIABLE | 1714 #undef INSERT_VARIABLE |
1708 | 1715 |
1709 } // namespace variables | 1716 } // namespace variables |
OLD | NEW |