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 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
885 "Example\n" | 885 "Example\n" |
886 "\n" | 886 "\n" |
887 " lib_dirs = [ \"/usr/lib/foo\", \"lib/doom_melon\" ]\n"; | 887 " lib_dirs = [ \"/usr/lib/foo\", \"lib/doom_melon\" ]\n"; |
888 | 888 |
889 const char kLibs[] = "libs"; | 889 const char kLibs[] = "libs"; |
890 const char kLibs_HelpShort[] = | 890 const char kLibs_HelpShort[] = |
891 "libs: [string list] Additional libraries to link."; | 891 "libs: [string list] Additional libraries to link."; |
892 const char kLibs_Help[] = | 892 const char kLibs_Help[] = |
893 "libs: Additional libraries to link.\n" | 893 "libs: Additional libraries to link.\n" |
894 "\n" | 894 "\n" |
895 " A list of strings.\n" | 895 " A list of library names or library paths.\n" |
896 "\n" | 896 "\n" |
897 " These files will be passed to the linker, which will generally search\n" | 897 " Values containing '/' will be treated as paths, and those without will\n" |
898 " be treated as library names." | |
899 "\n" | |
900 " Names will be passed to the linker, which will generally search\n" | |
898 " the library include path. Unlike a normal list of files, they will be\n" | 901 " the library include path. Unlike a normal list of files, they will be\n" |
899 " passed to the linker unmodified rather than being treated as file\n" | 902 " passed to the linker unmodified rather than being treated as file\n" |
900 " names relative to the current build file. Generally you would set\n" | 903 " names relative to the current build file. Generally you would set\n" |
901 " the \"lib_dirs\" so your library is found. If you need to specify\n" | 904 " the \"lib_dirs\" so your library is found. If you need to specify\n" |
902 " a path, you can use \"rebase_path\" to convert a path to be relative\n" | 905 " a path, you can use \"rebase_path\" to convert a path to be relative\n" |
903 " to the build directory.\n" | 906 " to the build directory.\n" |
904 "\n" | 907 "\n" |
905 " When constructing the linker command, the \"lib_prefix\" attribute of\n" | 908 " When constructing the linker command, the \"lib_prefix\" attribute of\n" |
906 " the linker tool in the current toolchain will be prepended to each\n" | 909 " the linker tool in the current toolchain will be prepended to each\n" |
907 " library. So your BUILD file should not specify the switch prefix\n" | 910 " library name (but not library paths). Your BUILD file should not\n" |
brettw
2015/12/18 00:04:55
How about replacing the existing docs with:
Value
agrieve
2015/12/18 15:39:08
Sounds great! Done.
| |
908 " (like \"-l\").\n" | 911 " specify the switch prefix (like \"-l\").\n" |
909 "\n" | 912 "\n" |
910 " Libraries ending in \".framework\" will be special-cased: the switch\n" | 913 " Libraries ending in \".framework\" will be special-cased: the switch\n" |
911 " \"-framework\" will be prepended instead of the lib_prefix, and the\n" | 914 " \"-framework\" will be prepended instead of the lib_prefix, and the\n" |
912 " \".framework\" suffix will be trimmed. This is to support the way Mac\n" | 915 " \".framework\" suffix will be trimmed. This is to support the way Mac\n" |
913 " links framework dependencies.\n" | 916 " links framework dependencies.\n" |
914 COMMON_LIB_INHERITANCE_HELP | 917 COMMON_LIB_INHERITANCE_HELP |
915 COMMON_ORDERING_HELP | 918 COMMON_ORDERING_HELP |
916 LIBS_AND_LIB_DIRS_ORDERING_HELP | 919 LIBS_AND_LIB_DIRS_ORDERING_HELP |
917 "\n" | 920 "\n" |
918 "Examples\n" | 921 "Examples\n" |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1432 INSERT_VARIABLE(Sources) | 1435 INSERT_VARIABLE(Sources) |
1433 INSERT_VARIABLE(Testonly) | 1436 INSERT_VARIABLE(Testonly) |
1434 INSERT_VARIABLE(Visibility) | 1437 INSERT_VARIABLE(Visibility) |
1435 } | 1438 } |
1436 return info_map; | 1439 return info_map; |
1437 } | 1440 } |
1438 | 1441 |
1439 #undef INSERT_VARIABLE | 1442 #undef INSERT_VARIABLE |
1440 | 1443 |
1441 } // namespace variables | 1444 } // namespace variables |
OLD | NEW |