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

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

Issue 1904473002: Add arflags to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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/variables.h ('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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 " source_set(\"b\") {\n" 411 " source_set(\"b\") {\n"
412 " deps = [ \":a_b_shared_deps\" ]\n" 412 " deps = [ \":a_b_shared_deps\" ]\n"
413 " # Sources here can include headers from a despite lack of deps.\n" 413 " # Sources here can include headers from a despite lack of deps.\n"
414 " ...\n" 414 " ...\n"
415 " }\n" 415 " }\n"
416 "\n" 416 "\n"
417 " group(\"a_b_shared_deps\") {\n" 417 " group(\"a_b_shared_deps\") {\n"
418 " public_deps = [ \":c\" ]\n" 418 " public_deps = [ \":c\" ]\n"
419 " }\n"; 419 " }\n";
420 420
421 const char kArflags[] = "arflags";
422 const char kArflags_HelpShort[] =
423 "arflags: [string list] Arguments passed to static_library archiver.";
424 const char kArflags_Help[] =
425 "arflags: Arguments passed to static_library archiver.\n"
426 "\n"
427 " A list of flags passed to the archive/lib command that creates static\n"
428 " libraries.\n"
429 "\n"
430 " arflags are NOT pushed to dependents, so applying arflags to source\n"
431 " sets or any other target type will be a no-op. As with ldflags,\n"
432 " you could put the arflags in a config and set that as a public or\n"
433 " \"all dependent\" config, but that will likely not be what you want.\n"
434 " If you have a chain of static libraries dependent on each other,\n"
435 " this can cause the flags to propagate up to other static libraries.\n"
436 " Due to the nature of how arflags are typically used, you will normally\n"
437 " want to apply them directly on static_library targets themselves.\n"
438 COMMON_ORDERING_HELP;
439
421 const char kArgs[] = "args"; 440 const char kArgs[] = "args";
422 const char kArgs_HelpShort[] = 441 const char kArgs_HelpShort[] =
423 "args: [string list] Arguments passed to an action."; 442 "args: [string list] Arguments passed to an action.";
424 const char kArgs_Help[] = 443 const char kArgs_Help[] =
425 "args: Arguments passed to an action.\n" 444 "args: Arguments passed to an action.\n"
426 "\n" 445 "\n"
427 " For action and action_foreach targets, args is the list of arguments\n" 446 " For action and action_foreach targets, args is the list of arguments\n"
428 " to pass to the script. Typically you would use source expansion (see\n" 447 " to pass to the script. Typically you would use source expansion (see\n"
429 " \"gn help source_expansion\") to insert the source file names.\n" 448 " \"gn help source_expansion\") to insert the source file names.\n"
430 "\n" 449 "\n"
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 INSERT_VARIABLE(TargetOutDir) 1650 INSERT_VARIABLE(TargetOutDir)
1632 } 1651 }
1633 return info_map; 1652 return info_map;
1634 } 1653 }
1635 1654
1636 const VariableInfoMap& GetTargetVariables() { 1655 const VariableInfoMap& GetTargetVariables() {
1637 static VariableInfoMap info_map; 1656 static VariableInfoMap info_map;
1638 if (info_map.empty()) { 1657 if (info_map.empty()) {
1639 INSERT_VARIABLE(AllDependentConfigs) 1658 INSERT_VARIABLE(AllDependentConfigs)
1640 INSERT_VARIABLE(AllowCircularIncludesFrom) 1659 INSERT_VARIABLE(AllowCircularIncludesFrom)
1660 INSERT_VARIABLE(Arflags)
1641 INSERT_VARIABLE(Args) 1661 INSERT_VARIABLE(Args)
1642 INSERT_VARIABLE(Asmflags) 1662 INSERT_VARIABLE(Asmflags)
1643 INSERT_VARIABLE(AssertNoDeps) 1663 INSERT_VARIABLE(AssertNoDeps)
1644 INSERT_VARIABLE(BundleRootDir) 1664 INSERT_VARIABLE(BundleRootDir)
1645 INSERT_VARIABLE(BundleResourcesDir) 1665 INSERT_VARIABLE(BundleResourcesDir)
1646 INSERT_VARIABLE(BundleExecutableDir) 1666 INSERT_VARIABLE(BundleExecutableDir)
1647 INSERT_VARIABLE(BundlePlugInsDir) 1667 INSERT_VARIABLE(BundlePlugInsDir)
1648 INSERT_VARIABLE(Cflags) 1668 INSERT_VARIABLE(Cflags)
1649 INSERT_VARIABLE(CflagsC) 1669 INSERT_VARIABLE(CflagsC)
1650 INSERT_VARIABLE(CflagsCC) 1670 INSERT_VARIABLE(CflagsCC)
(...skipping 29 matching lines...) Expand all
1680 INSERT_VARIABLE(Testonly) 1700 INSERT_VARIABLE(Testonly)
1681 INSERT_VARIABLE(Visibility) 1701 INSERT_VARIABLE(Visibility)
1682 INSERT_VARIABLE(WriteRuntimeDeps) 1702 INSERT_VARIABLE(WriteRuntimeDeps)
1683 } 1703 }
1684 return info_map; 1704 return info_map;
1685 } 1705 }
1686 1706
1687 #undef INSERT_VARIABLE 1707 #undef INSERT_VARIABLE
1688 1708
1689 } // namespace variables 1709 } // namespace variables
OLDNEW
« no previous file with comments | « tools/gn/variables.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698