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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 " 2. Those set on the \"configs\" on the target in order that the\n" \ | 312 " 2. Those set on the \"configs\" on the target in order that the\n" \ |
313 " configs appear in the list.\n" \ | 313 " configs appear in the list.\n" \ |
314 " 3. Those set on the \"all_dependent_configs\" on the target in order\n" \ | 314 " 3. Those set on the \"all_dependent_configs\" on the target in order\n" \ |
315 " that the configs appear in the list.\n" \ | 315 " that the configs appear in the list.\n" \ |
316 " 4. Those set on the \"public_configs\" on the target in order that\n" \ | 316 " 4. Those set on the \"public_configs\" on the target in order that\n" \ |
317 " those configs appear in the list.\n" \ | 317 " those configs appear in the list.\n" \ |
318 " 5. all_dependent_configs pulled from dependencies, in the order of\n" \ | 318 " 5. all_dependent_configs pulled from dependencies, in the order of\n" \ |
319 " the \"deps\" list. This is done recursively. If a config appears\n" \ | 319 " the \"deps\" list. This is done recursively. If a config appears\n" \ |
320 " more than once, only the first occurance will be used.\n" \ | 320 " more than once, only the first occurance will be used.\n" \ |
321 " 6. public_configs pulled from dependencies, in the order of the\n" \ | 321 " 6. public_configs pulled from dependencies, in the order of the\n" \ |
322 " \"deps\" list. If a dependency has " \ | 322 " \"deps\" list. If a dependency is public, they will be applied\n" \ |
323 "\"forward_dependent_configs_from\",\n" \ | 323 " recursively.\n" |
324 " or are public dependencies, they will be applied recursively.\n" | |
325 | 324 |
326 const char kAllDependentConfigs[] = "all_dependent_configs"; | 325 const char kAllDependentConfigs[] = "all_dependent_configs"; |
327 const char kAllDependentConfigs_HelpShort[] = | 326 const char kAllDependentConfigs_HelpShort[] = |
328 "all_dependent_configs: [label list] Configs to be forced on dependents."; | 327 "all_dependent_configs: [label list] Configs to be forced on dependents."; |
329 const char kAllDependentConfigs_Help[] = | 328 const char kAllDependentConfigs_Help[] = |
330 "all_dependent_configs: Configs to be forced on dependents.\n" | 329 "all_dependent_configs: Configs to be forced on dependents.\n" |
331 "\n" | 330 "\n" |
332 " A list of config labels.\n" | 331 " A list of config labels.\n" |
333 "\n" | 332 "\n" |
334 " All targets depending on this one, and recursively, all targets\n" | 333 " All targets depending on this one, and recursively, all targets\n" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 " that can't be linked (like actions and groups) listed in \"deps\" will\n" | 604 " that can't be linked (like actions and groups) listed in \"deps\" will\n" |
606 " be treated as \"data_deps\". Likewise, if the current target isn't\n" | 605 " be treated as \"data_deps\". Likewise, if the current target isn't\n" |
607 " linkable, then all deps will be treated as \"data_deps\".\n" | 606 " linkable, then all deps will be treated as \"data_deps\".\n" |
608 "\n" | 607 "\n" |
609 " These dependencies are private in that it does not grant dependent\n" | 608 " These dependencies are private in that it does not grant dependent\n" |
610 " targets the ability to include headers from the dependency, and direct\n" | 609 " targets the ability to include headers from the dependency, and direct\n" |
611 " dependent configs are not forwarded.\n" | 610 " dependent configs are not forwarded.\n" |
612 "\n" | 611 "\n" |
613 " See also \"public_deps\" and \"data_deps\".\n"; | 612 " See also \"public_deps\" and \"data_deps\".\n"; |
614 | 613 |
| 614 // TODO(brettw) remove this, deprecated. |
615 const char kForwardDependentConfigsFrom[] = "forward_dependent_configs_from"; | 615 const char kForwardDependentConfigsFrom[] = "forward_dependent_configs_from"; |
616 const char kForwardDependentConfigsFrom_HelpShort[] = | 616 const char kForwardDependentConfigsFrom_HelpShort[] = |
617 "forward_dependent_configs_from: [label list] Forward dependent's configs."; | 617 "forward_dependent_configs_from: [label list] DEPRECATED."; |
618 const char kForwardDependentConfigsFrom_Help[] = | 618 const char kForwardDependentConfigsFrom_Help[] = |
619 "forward_dependent_configs_from\n" | 619 "forward_dependent_configs_from\n" |
620 "\n" | 620 "\n" |
621 " A list of target labels.\n" | 621 " A list of target labels.\n" |
622 "\n" | 622 "\n" |
| 623 " DEPRECATED. Use public_deps instead which will have the same effect.\n" |
| 624 "\n" |
623 " Exposes the public_configs from a private dependent target as\n" | 625 " Exposes the public_configs from a private dependent target as\n" |
624 " public_configs of the current one. Each label in this list\n" | 626 " public_configs of the current one. Each label in this list\n" |
625 " must also be in the deps.\n" | 627 " must also be in the deps.\n" |
626 "\n" | 628 "\n" |
627 " Generally you should use public_deps instead of this variable to\n" | 629 " Generally you should use public_deps instead of this variable to\n" |
628 " express the concept of exposing a dependency as part of a target's\n" | 630 " express the concept of exposing a dependency as part of a target's\n" |
629 " public API. We're considering removing this variable.\n" | 631 " public API. We're considering removing this variable.\n" |
630 "\n" | 632 "\n" |
631 "Discussion\n" | 633 "Discussion\n" |
632 "\n" | 634 "\n" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 const char kPublicDeps[] = "public_deps"; | 902 const char kPublicDeps[] = "public_deps"; |
901 const char kPublicDeps_HelpShort[] = | 903 const char kPublicDeps_HelpShort[] = |
902 "public_deps: [label list] Declare public dependencies."; | 904 "public_deps: [label list] Declare public dependencies."; |
903 const char kPublicDeps_Help[] = | 905 const char kPublicDeps_Help[] = |
904 "public_deps: Declare public dependencies.\n" | 906 "public_deps: Declare public dependencies.\n" |
905 "\n" | 907 "\n" |
906 " Public dependencies are like private dependencies (\"deps\") but\n" | 908 " Public dependencies are like private dependencies (\"deps\") but\n" |
907 " additionally express that the current target exposes the listed deps\n" | 909 " additionally express that the current target exposes the listed deps\n" |
908 " as part of its public API.\n" | 910 " as part of its public API.\n" |
909 "\n" | 911 "\n" |
910 " This has two ramifications:\n" | 912 " This has several ramifications:\n" |
911 "\n" | 913 "\n" |
912 " - public_configs that are part of the dependency are forwarded\n" | 914 " - public_configs that are part of the dependency are forwarded\n" |
913 " to direct dependents (this is the same as using\n" | 915 " to direct dependents.\n" |
914 " forward_dependent_configs_from).\n" | |
915 "\n" | 916 "\n" |
916 " - public headers in the dependency are usable by dependents\n" | 917 " - Public headers in the dependency are usable by dependents\n" |
917 " (includes do not require a direct dependency or visibility).\n" | 918 " (includes do not require a direct dependency or visibility).\n" |
918 "\n" | 919 "\n" |
| 920 " - If the current target is a shared library, other shared libraries\n" |
| 921 " that it publicly depends on (directly or indirectly) are\n" |
| 922 " propagated up the dependency tree to dependents for linking.\n" |
| 923 "\n" |
919 "Discussion\n" | 924 "Discussion\n" |
920 "\n" | 925 "\n" |
921 " Say you have three targets: A -> B -> C. C's visibility may allow\n" | 926 " Say you have three targets: A -> B -> C. C's visibility may allow\n" |
922 " B to depend on it but not A. Normally, this would prevent A from\n" | 927 " B to depend on it but not A. Normally, this would prevent A from\n" |
923 " including any headers from C, and C's public_configs would apply\n" | 928 " including any headers from C, and C's public_configs would apply\n" |
924 " only to B.\n" | 929 " only to B.\n" |
925 "\n" | 930 "\n" |
926 " If B lists C in its public_deps instead of regular deps, A will now\n" | 931 " If B lists C in its public_deps instead of regular deps, A will now\n" |
927 " inherit C's public_configs and the ability to include C's public\n" | 932 " inherit C's public_configs and the ability to include C's public\n" |
928 " headers.\n" | 933 " headers.\n" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 INSERT_VARIABLE(Sources) | 1116 INSERT_VARIABLE(Sources) |
1112 INSERT_VARIABLE(Testonly) | 1117 INSERT_VARIABLE(Testonly) |
1113 INSERT_VARIABLE(Visibility) | 1118 INSERT_VARIABLE(Visibility) |
1114 } | 1119 } |
1115 return info_map; | 1120 return info_map; |
1116 } | 1121 } |
1117 | 1122 |
1118 #undef INSERT_VARIABLE | 1123 #undef INSERT_VARIABLE |
1119 | 1124 |
1120 } // namespace variables | 1125 } // namespace variables |
OLD | NEW |