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

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

Issue 1660213002: GN: Don't write ldflags and libs when unneeded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update reference Created 4 years, 10 months 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/ninja_binary_target_writer_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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 " lib_dirs = [ \"/usr/lib/foo\", \"lib/doom_melon\" ]\n"; 930 " lib_dirs = [ \"/usr/lib/foo\", \"lib/doom_melon\" ]\n";
931 931
932 const char kLibs[] = "libs"; 932 const char kLibs[] = "libs";
933 const char kLibs_HelpShort[] = 933 const char kLibs_HelpShort[] =
934 "libs: [string list] Additional libraries to link."; 934 "libs: [string list] Additional libraries to link.";
935 const char kLibs_Help[] = 935 const char kLibs_Help[] =
936 "libs: Additional libraries to link.\n" 936 "libs: Additional libraries to link.\n"
937 "\n" 937 "\n"
938 " A list of library names or library paths.\n" 938 " A list of library names or library paths.\n"
939 "\n" 939 "\n"
940 "Values containing '/' will be treated as references to files in the\n" 940 " These libraries will be linked into the final binary (executable or\n"
941 "build. They will be rebased to be relative to the build directory and\n" 941 " shared library) containing the current target.\n"
942 "specified in the \"libs\" for linker tools. This facility should be used\n" 942 COMMON_LIB_INHERITANCE_HELP
943 "for libraries that are checked in to the build. For libraries that are\n"
944 "generated by the build, use normal GN deps to link them.\n"
945 "\n" 943 "\n"
946 "Values not containing '/' will be treated as system library names. These\n" 944 "Types of libs\n"
947 "will be passed unmodified to the linker and prefixed with the\n"
948 "\"lib_prefix\" attribute of the linker tool. Generally you would set the\n"
949 "\"lib_dirs\" so the given library is found. Your BUILD.gn file should\n"
950 "not specify the switch prefix (like \"-l\"): this will be encoded in\n"
951 "the \"lib_prefix\" of the tool.\n"
952 "\n" 945 "\n"
953 " Libraries ending in \".framework\" will be special-cased: the switch\n" 946 " There are several different things that can be expressed in libs:\n"
954 " \"-framework\" will be prepended instead of the lib_prefix, and the\n" 947 "\n"
955 " \".framework\" suffix will be trimmed. This is to support the way Mac\n" 948 " File paths\n"
956 " links framework dependencies.\n" 949 " Values containing '/' will be treated as references to files in\n"
957 COMMON_LIB_INHERITANCE_HELP 950 " the checkout. They will be rebased to be relative to the build\n"
951 " directory and specified in the \"libs\" for linker tools. This\n"
952 " facility should be used for libraries that are checked in to the\n"
953 " version control. For libraries that are generated by the build,\n"
954 " use normal GN deps to link them.\n"
955 "\n"
956 " System libraries\n"
957 " Values not containing '/' will be treated as system library names.\n"
958 " These will be passed unmodified to the linker and prefixed with\n"
959 " the \"lib_prefix\" attribute of the linker tool. Generally you\n"
960 " would set the \"lib_dirs\" so the given library is found. Your\n"
961 " BUILD.gn file should not specify the switch (like \"-l\"): this\n"
962 " will be encoded in the \"lib_prefix\" of the tool.\n"
963 "\n"
964 " Apple frameworks\n"
965 " System libraries ending in \".framework\" will be special-cased:\n"
966 " the switch \"-framework\" will be prepended instead of the\n"
967 " lib_prefix, and the \".framework\" suffix will be trimmed. This is\n"
968 " to support the way Mac links framework dependencies.\n"
958 COMMON_ORDERING_HELP 969 COMMON_ORDERING_HELP
959 LIBS_AND_LIB_DIRS_ORDERING_HELP 970 LIBS_AND_LIB_DIRS_ORDERING_HELP
960 "\n" 971 "\n"
961 "Examples\n" 972 "Examples\n"
962 "\n" 973 "\n"
963 " On Windows:\n" 974 " On Windows:\n"
964 " libs = [ \"ctl3d.lib\" ]\n" 975 " libs = [ \"ctl3d.lib\" ]\n"
976 "\n"
965 " On Linux:\n" 977 " On Linux:\n"
966 " libs = [ \"ld\" ]\n"; 978 " libs = [ \"ld\" ]\n";
967 979
968 const char kOutputExtension[] = "output_extension"; 980 const char kOutputExtension[] = "output_extension";
969 const char kOutputExtension_HelpShort[] = 981 const char kOutputExtension_HelpShort[] =
970 "output_extension: [string] Value to use for the output's file extension."; 982 "output_extension: [string] Value to use for the output's file extension.";
971 const char kOutputExtension_Help[] = 983 const char kOutputExtension_Help[] =
972 "output_extension: Value to use for the output's file extension.\n" 984 "output_extension: Value to use for the output's file extension.\n"
973 "\n" 985 "\n"
974 " Normally the file extension for a target is based on the target\n" 986 " Normally the file extension for a target is based on the target\n"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 INSERT_VARIABLE(Sources) 1488 INSERT_VARIABLE(Sources)
1477 INSERT_VARIABLE(Testonly) 1489 INSERT_VARIABLE(Testonly)
1478 INSERT_VARIABLE(Visibility) 1490 INSERT_VARIABLE(Visibility)
1479 } 1491 }
1480 return info_map; 1492 return info_map;
1481 } 1493 }
1482 1494
1483 #undef INSERT_VARIABLE 1495 #undef INSERT_VARIABLE
1484 1496
1485 } // namespace variables 1497 } // namespace variables
OLDNEW
« no previous file with comments | « tools/gn/ninja_binary_target_writer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698