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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 COMMON_ORDERING_HELP; | 854 COMMON_ORDERING_HELP; |
855 | 855 |
856 #define COMMON_LIB_INHERITANCE_HELP \ | 856 #define COMMON_LIB_INHERITANCE_HELP \ |
857 "\n" \ | 857 "\n" \ |
858 " libs and lib_dirs work differently than other flags in two respects.\n" \ | 858 " libs and lib_dirs work differently than other flags in two respects.\n" \ |
859 " First, then are inherited across static library boundaries until a\n" \ | 859 " First, then are inherited across static library boundaries until a\n" \ |
860 " shared library or executable target is reached. Second, they are\n" \ | 860 " shared library or executable target is reached. Second, they are\n" \ |
861 " uniquified so each one is only passed once (the first instance of it\n" \ | 861 " uniquified so each one is only passed once (the first instance of it\n" \ |
862 " will be the one used).\n" | 862 " will be the one used).\n" |
863 | 863 |
| 864 #define LIBS_AND_LIB_DIRS_ORDERING_HELP \ |
| 865 "\n" \ |
| 866 " For \"libs\" and \"lib_dirs\" only, the values propagated from\n" \ |
| 867 " dependencies (as described above) are applied last assuming they\n" \ |
| 868 " are not already in the list.\n" |
| 869 |
864 const char kLibDirs[] = "lib_dirs"; | 870 const char kLibDirs[] = "lib_dirs"; |
865 const char kLibDirs_HelpShort[] = | 871 const char kLibDirs_HelpShort[] = |
866 "lib_dirs: [directory list] Additional library directories."; | 872 "lib_dirs: [directory list] Additional library directories."; |
867 const char kLibDirs_Help[] = | 873 const char kLibDirs_Help[] = |
868 "lib_dirs: Additional library directories.\n" | 874 "lib_dirs: Additional library directories.\n" |
869 "\n" | 875 "\n" |
870 " A list of directories.\n" | 876 " A list of directories.\n" |
871 "\n" | 877 "\n" |
872 " Specifies additional directories passed to the linker for searching\n" | 878 " Specifies additional directories passed to the linker for searching\n" |
873 " for the required libraries. If an item is not an absolute path, it\n" | 879 " for the required libraries. If an item is not an absolute path, it\n" |
874 " will be treated as being relative to the current build file.\n" | 880 " will be treated as being relative to the current build file.\n" |
875 COMMON_LIB_INHERITANCE_HELP | 881 COMMON_LIB_INHERITANCE_HELP |
876 COMMON_ORDERING_HELP | 882 COMMON_ORDERING_HELP |
| 883 LIBS_AND_LIB_DIRS_ORDERING_HELP |
877 "\n" | 884 "\n" |
878 "Example\n" | 885 "Example\n" |
879 "\n" | 886 "\n" |
880 " lib_dirs = [ \"/usr/lib/foo\", \"lib/doom_melon\" ]\n"; | 887 " lib_dirs = [ \"/usr/lib/foo\", \"lib/doom_melon\" ]\n"; |
881 | 888 |
882 const char kLibs[] = "libs"; | 889 const char kLibs[] = "libs"; |
883 const char kLibs_HelpShort[] = | 890 const char kLibs_HelpShort[] = |
884 "libs: [string list] Additional libraries to link."; | 891 "libs: [string list] Additional libraries to link."; |
885 const char kLibs_Help[] = | 892 const char kLibs_Help[] = |
886 "libs: Additional libraries to link.\n" | 893 "libs: Additional libraries to link.\n" |
(...skipping 12 matching lines...) Expand all Loading... |
899 " the linker tool in the current toolchain will be prepended to each\n" | 906 " the linker tool in the current toolchain will be prepended to each\n" |
900 " library. So your BUILD file should not specify the switch prefix\n" | 907 " library. So your BUILD file should not specify the switch prefix\n" |
901 " (like \"-l\").\n" | 908 " (like \"-l\").\n" |
902 "\n" | 909 "\n" |
903 " Libraries ending in \".framework\" will be special-cased: the switch\n" | 910 " Libraries ending in \".framework\" will be special-cased: the switch\n" |
904 " \"-framework\" will be prepended instead of the lib_prefix, and the\n" | 911 " \"-framework\" will be prepended instead of the lib_prefix, and the\n" |
905 " \".framework\" suffix will be trimmed. This is to support the way Mac\n" | 912 " \".framework\" suffix will be trimmed. This is to support the way Mac\n" |
906 " links framework dependencies.\n" | 913 " links framework dependencies.\n" |
907 COMMON_LIB_INHERITANCE_HELP | 914 COMMON_LIB_INHERITANCE_HELP |
908 COMMON_ORDERING_HELP | 915 COMMON_ORDERING_HELP |
| 916 LIBS_AND_LIB_DIRS_ORDERING_HELP |
909 "\n" | 917 "\n" |
910 "Examples\n" | 918 "Examples\n" |
911 "\n" | 919 "\n" |
912 " On Windows:\n" | 920 " On Windows:\n" |
913 " libs = [ \"ctl3d.lib\" ]\n" | 921 " libs = [ \"ctl3d.lib\" ]\n" |
914 " On Linux:\n" | 922 " On Linux:\n" |
915 " libs = [ \"ld\" ]\n"; | 923 " libs = [ \"ld\" ]\n"; |
916 | 924 |
917 const char kOutputExtension[] = "output_extension"; | 925 const char kOutputExtension[] = "output_extension"; |
918 const char kOutputExtension_HelpShort[] = | 926 const char kOutputExtension_HelpShort[] = |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 INSERT_VARIABLE(Sources) | 1432 INSERT_VARIABLE(Sources) |
1425 INSERT_VARIABLE(Testonly) | 1433 INSERT_VARIABLE(Testonly) |
1426 INSERT_VARIABLE(Visibility) | 1434 INSERT_VARIABLE(Visibility) |
1427 } | 1435 } |
1428 return info_map; | 1436 return info_map; |
1429 } | 1437 } |
1430 | 1438 |
1431 #undef INSERT_VARIABLE | 1439 #undef INSERT_VARIABLE |
1432 | 1440 |
1433 } // namespace variables | 1441 } // namespace variables |
OLD | NEW |