Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: tools/gn/variables.cc

Issue 1518663003: Make GN public configs apply libs to targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/target_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « tools/gn/target_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698