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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 const char kCommonCflagsHelp[] = | 397 const char kCommonCflagsHelp[] = |
398 "cflags*: Flags passed to the C compiler.\n" | 398 "cflags*: Flags passed to the C compiler.\n" |
399 "\n" | 399 "\n" |
400 " A list of strings.\n" | 400 " A list of strings.\n" |
401 "\n" | 401 "\n" |
402 " \"cflags\" are passed to all invocations of the C, C++, Objective C,\n" | 402 " \"cflags\" are passed to all invocations of the C, C++, Objective C,\n" |
403 " and Objective C++ compilers.\n" | 403 " and Objective C++ compilers.\n" |
404 "\n" | 404 "\n" |
405 " To target one of these variants individually, use \"cflags_c\",\n" | 405 " To target one of these variants individually, use \"cflags_c\",\n" |
406 " \"cflags_cc\", \"cflags_objc\", and \"cflags_objcc\",\n" | 406 " \"cflags_cc\", \"cflags_objc\", and \"cflags_objcc\",\n" |
407 " respectively.\n" | 407 " respectively. These variant-specific versions of cflags* will be\n" |
| 408 " appended on the compiler command line after \"cflags\".\n" |
408 "\n" | 409 "\n" |
409 " These variant-specific versions of cflags* will be appended to the\n" | 410 " See also \"asmflags\" for flags for assembly-language files.\n" |
410 " \"cflags\".\n" | |
411 COMMON_ORDERING_HELP; | 411 COMMON_ORDERING_HELP; |
412 const char* kCflags_Help = kCommonCflagsHelp; | 412 const char* kCflags_Help = kCommonCflagsHelp; |
413 | 413 |
414 const char kAsmflags[] = "asmflags"; | 414 const char kAsmflags[] = "asmflags"; |
415 const char kAsmflags_HelpShort[] = | 415 const char kAsmflags_HelpShort[] = |
416 "asmflags: [string list] Flags passed to any assembly compiler."; | 416 "asmflags: [string list] Flags passed to the assembler."; |
417 const char* kAsmflags_Help = | 417 const char* kAsmflags_Help = |
418 "asmflags: Flags passed to any assembly compiler.\n" | 418 "asmflags: Flags passed to the assembler.\n" |
419 "\n" | 419 "\n" |
420 " A list of strings.\n" | 420 " A list of strings.\n" |
421 "\n" | 421 "\n" |
422 " \"asmflags\" are passed to any invocation of a tool that takes an\n" | 422 " \"asmflags\" are passed to any invocation of a tool that takes an\n" |
423 " .asm or .S file as input.\n"; | 423 " .asm or .S file as input.\n" |
| 424 COMMON_ORDERING_HELP; |
424 | 425 |
425 const char kCflagsC[] = "cflags_c"; | 426 const char kCflagsC[] = "cflags_c"; |
426 const char kCflagsC_HelpShort[] = | 427 const char kCflagsC_HelpShort[] = |
427 "cflags_c: [string list] Flags passed to the C compiler."; | 428 "cflags_c: [string list] Flags passed to the C compiler."; |
428 const char* kCflagsC_Help = kCommonCflagsHelp; | 429 const char* kCflagsC_Help = kCommonCflagsHelp; |
429 | 430 |
430 const char kCflagsCC[] = "cflags_cc"; | 431 const char kCflagsCC[] = "cflags_cc"; |
431 const char kCflagsCC_HelpShort[] = | 432 const char kCflagsCC_HelpShort[] = |
432 "cflags_cc: [string list] Flags passed to the C++ compiler."; | 433 "cflags_cc: [string list] Flags passed to the C++ compiler."; |
433 const char* kCflagsCC_Help = kCommonCflagsHelp; | 434 const char* kCflagsCC_Help = kCommonCflagsHelp; |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 } | 1384 } |
1384 return info_map; | 1385 return info_map; |
1385 } | 1386 } |
1386 | 1387 |
1387 const VariableInfoMap& GetTargetVariables() { | 1388 const VariableInfoMap& GetTargetVariables() { |
1388 static VariableInfoMap info_map; | 1389 static VariableInfoMap info_map; |
1389 if (info_map.empty()) { | 1390 if (info_map.empty()) { |
1390 INSERT_VARIABLE(AllDependentConfigs) | 1391 INSERT_VARIABLE(AllDependentConfigs) |
1391 INSERT_VARIABLE(AllowCircularIncludesFrom) | 1392 INSERT_VARIABLE(AllowCircularIncludesFrom) |
1392 INSERT_VARIABLE(Args) | 1393 INSERT_VARIABLE(Args) |
| 1394 INSERT_VARIABLE(Asmflags) |
1393 INSERT_VARIABLE(Cflags) | 1395 INSERT_VARIABLE(Cflags) |
1394 INSERT_VARIABLE(CflagsC) | 1396 INSERT_VARIABLE(CflagsC) |
1395 INSERT_VARIABLE(CflagsCC) | 1397 INSERT_VARIABLE(CflagsCC) |
1396 INSERT_VARIABLE(CflagsObjC) | 1398 INSERT_VARIABLE(CflagsObjC) |
1397 INSERT_VARIABLE(CflagsObjCC) | 1399 INSERT_VARIABLE(CflagsObjCC) |
1398 INSERT_VARIABLE(CheckIncludes) | 1400 INSERT_VARIABLE(CheckIncludes) |
1399 INSERT_VARIABLE(CompleteStaticLib) | 1401 INSERT_VARIABLE(CompleteStaticLib) |
1400 INSERT_VARIABLE(Configs) | 1402 INSERT_VARIABLE(Configs) |
1401 INSERT_VARIABLE(Console) | 1403 INSERT_VARIABLE(Console) |
1402 INSERT_VARIABLE(Data) | 1404 INSERT_VARIABLE(Data) |
(...skipping 19 matching lines...) Expand all Loading... |
1422 INSERT_VARIABLE(Sources) | 1424 INSERT_VARIABLE(Sources) |
1423 INSERT_VARIABLE(Testonly) | 1425 INSERT_VARIABLE(Testonly) |
1424 INSERT_VARIABLE(Visibility) | 1426 INSERT_VARIABLE(Visibility) |
1425 } | 1427 } |
1426 return info_map; | 1428 return info_map; |
1427 } | 1429 } |
1428 | 1430 |
1429 #undef INSERT_VARIABLE | 1431 #undef INSERT_VARIABLE |
1430 | 1432 |
1431 } // namespace variables | 1433 } // namespace variables |
OLD | NEW |