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

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

Issue 318383003: Improve error messages and reporting in GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/setup.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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 "\n" 289 "\n"
290 " For action and action_foreach targets, args is the list of arguments\n" 290 " For action and action_foreach targets, args is the list of arguments\n"
291 " to pass to the script. Typically you would use source expansion (see\n" 291 " to pass to the script. Typically you would use source expansion (see\n"
292 " \"gn help source_expansion\") to insert the source file names.\n" 292 " \"gn help source_expansion\") to insert the source file names.\n"
293 "\n" 293 "\n"
294 " See also \"gn help action\" and \"gn help action_foreach\".\n"; 294 " See also \"gn help action\" and \"gn help action_foreach\".\n";
295 295
296 const char kCflags[] = "cflags"; 296 const char kCflags[] = "cflags";
297 const char kCflags_HelpShort[] = 297 const char kCflags_HelpShort[] =
298 "cflags: [string list] Flags passed to all C compiler variants."; 298 "cflags: [string list] Flags passed to all C compiler variants.";
299 // Avoid writing long help for each variant.
300 #define COMMON_FLAGS_HELP \
301 "\n"\
302 " Flags are never quoted. If your flag includes a string that must be\n"\
303 " quoted, you must do it yourself. This also means that you can\n"\
304 " specify more than one flag in a string if necessary (\"--foo --bar\")\n"\
305 " and have them be seen as separate by the tool.\n"
306 const char kCommonCflagsHelp[] = 299 const char kCommonCflagsHelp[] =
307 "cflags*: Flags passed to the C compiler.\n" 300 "cflags*: Flags passed to the C compiler.\n"
308 "\n" 301 "\n"
309 " A list of strings.\n" 302 " A list of strings.\n"
310 "\n" 303 "\n"
311 " \"cflags\" are passed to all invocations of the C, C++, Objective C,\n" 304 " \"cflags\" are passed to all invocations of the C, C++, Objective C,\n"
312 " and Objective C++ compilers.\n" 305 " and Objective C++ compilers.\n"
313 "\n" 306 "\n"
314 " To target one of these variants individually, use \"cflags_c\",\n" 307 " To target one of these variants individually, use \"cflags_c\",\n"
315 " \"cflags_cc\", \"cflags_objc\", and \"cflags_objcc\", respectively.\n" 308 " \"cflags_cc\", \"cflags_objc\", and \"cflags_objcc\", respectively.\n"
316 " These variant-specific versions will be appended to the \"cflags\".\n" 309 " These variant-specific versions will be appended to the \"cflags\".\n"
317 COMMON_FLAGS_HELP
318 COMMON_ORDERING_HELP; 310 COMMON_ORDERING_HELP;
319 const char* kCflags_Help = kCommonCflagsHelp; 311 const char* kCflags_Help = kCommonCflagsHelp;
320 312
321 const char kCflagsC[] = "cflags_c"; 313 const char kCflagsC[] = "cflags_c";
322 const char kCflagsC_HelpShort[] = 314 const char kCflagsC_HelpShort[] =
323 "cflags_c: [string list] Flags passed to the C compiler."; 315 "cflags_c: [string list] Flags passed to the C compiler.";
324 const char* kCflagsC_Help = kCommonCflagsHelp; 316 const char* kCflagsC_Help = kCommonCflagsHelp;
325 317
326 const char kCflagsCC[] = "cflags_cc"; 318 const char kCflagsCC[] = "cflags_cc";
327 const char kCflagsCC_HelpShort[] = 319 const char kCflagsCC_HelpShort[] =
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 "\n" 544 "\n"
553 " A list of strings.\n" 545 " A list of strings.\n"
554 "\n" 546 "\n"
555 " These flags are passed on the command-line to the linker and generally\n" 547 " These flags are passed on the command-line to the linker and generally\n"
556 " specify various linking options. Most targets will not need these and\n" 548 " specify various linking options. Most targets will not need these and\n"
557 " will use \"libs\" and \"lib_dirs\" instead.\n" 549 " will use \"libs\" and \"lib_dirs\" instead.\n"
558 "\n" 550 "\n"
559 " ldflags are NOT pushed to dependents, so applying ldflags to source\n" 551 " ldflags are NOT pushed to dependents, so applying ldflags to source\n"
560 " sets or static libraries will be a no-op. If you want to apply ldflags\n" 552 " sets or static libraries will be a no-op. If you want to apply ldflags\n"
561 " to dependent targets, put them in a config and set it in the\n" 553 " to dependent targets, put them in a config and set it in the\n"
562 " all_dependent_configs or direct_dependent_configs.\n" 554 " all_dependent_configs or direct_dependent_configs.\n";
563 COMMON_FLAGS_HELP;
564 555
565 #define COMMON_LIB_INHERITANCE_HELP \ 556 #define COMMON_LIB_INHERITANCE_HELP \
566 "\n" \ 557 "\n" \
567 " libs and lib_dirs work differently than other flags in two respects.\n" \ 558 " libs and lib_dirs work differently than other flags in two respects.\n" \
568 " First, then are inherited across static library boundaries until a\n" \ 559 " First, then are inherited across static library boundaries until a\n" \
569 " shared library or executable target is reached. Second, they are\n" \ 560 " shared library or executable target is reached. Second, they are\n" \
570 " uniquified so each one is only passed once (the first instance of it\n" \ 561 " uniquified so each one is only passed once (the first instance of it\n" \
571 " will be the one used).\n" 562 " will be the one used).\n"
572 563
573 const char kLibDirs[] = "lib_dirs"; 564 const char kLibDirs[] = "lib_dirs";
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 INSERT_VARIABLE(SourcePrereqs) 888 INSERT_VARIABLE(SourcePrereqs)
898 INSERT_VARIABLE(Sources) 889 INSERT_VARIABLE(Sources)
899 INSERT_VARIABLE(Visibility) 890 INSERT_VARIABLE(Visibility)
900 } 891 }
901 return info_map; 892 return info_map;
902 } 893 }
903 894
904 #undef INSERT_VARIABLE 895 #undef INSERT_VARIABLE
905 896
906 } // namespace variables 897 } // namespace variables
OLDNEW
« no previous file with comments | « tools/gn/setup.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698