| OLD | NEW |
| 1 # GN Reference | 1 # GN Reference |
| 2 | 2 |
| 3 *This page is automatically generated from* `gn help --markdown all`. | 3 *This page is automatically generated from* `gn help --markdown all`. |
| 4 | 4 |
| 5 ## **\--args**: Specifies build arguments overrides. | 5 ## **\--args**: Specifies build arguments overrides. |
| 6 | 6 |
| 7 ``` | 7 ``` |
| 8 See "gn help buildargs" for an overview of how build arguments work. | 8 See "gn help buildargs" for an overview of how build arguments work. |
| 9 | 9 |
| 10 Most operations take a build directory. The build arguments are taken | 10 Most operations take a build directory. The build arguments are taken |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 XML file contains a list of include paths and defines. Because GN does | 675 XML file contains a list of include paths and defines. Because GN does |
| 676 not generate a full .cproject definition, it is not possible to | 676 not generate a full .cproject definition, it is not possible to |
| 677 properly define includes/defines for each file individually. | 677 properly define includes/defines for each file individually. |
| 678 Instead, one set of includes/defines is generated for the entire | 678 Instead, one set of includes/defines is generated for the entire |
| 679 project. This works fairly well but may still result in a few indexer | 679 project. This works fairly well but may still result in a few indexer |
| 680 issues here and there. | 680 issues here and there. |
| 681 | 681 |
| 682 | 682 |
| 683 ``` | 683 ``` |
| 684 ## **gn help <anything>** | 684 ## **gn help <anything>** |
| 685 |
| 685 ``` | 686 ``` |
| 686 Yo dawg, I heard you like help on your help so I put help on the help | 687 Yo dawg, I heard you like help on your help so I put help on the help |
| 687 in the help. | 688 in the help. |
| 688 | 689 |
| 690 You can also use "all" as the parameter to get all help at once. |
| 691 |
| 692 ``` |
| 693 |
| 694 ### **Switches** |
| 695 |
| 696 ``` |
| 697 --markdown |
| 698 Format output in markdown syntax. |
| 699 |
| 700 ``` |
| 701 |
| 702 ### **Example** |
| 703 |
| 704 ``` |
| 705 gn help --markdown all |
| 706 Dump all help to stdout in markdown format. |
| 707 |
| 689 | 708 |
| 690 ``` | 709 ``` |
| 691 ## **gn ls <out_dir> [<label_pattern>] [\--all-toolchains] [\--as=...]** | 710 ## **gn ls <out_dir> [<label_pattern>] [\--all-toolchains] [\--as=...]** |
| 692 ``` | 711 ``` |
| 693 [--type=...] [--testonly=...] | 712 [--type=...] [--testonly=...] |
| 694 | 713 |
| 695 Lists all targets matching the given pattern for the given build | 714 Lists all targets matching the given pattern for the given build |
| 696 directory. By default, only targets in the default toolchain will | 715 directory. By default, only targets in the default toolchain will |
| 697 be matched unless a toolchain is explicitly supplied. | 716 be matched unless a toolchain is explicitly supplied. |
| 698 | 717 |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1585 | 1604 |
| 1586 ``` | 1605 ``` |
| 1587 ## **foreach**: Iterate over a list. | 1606 ## **foreach**: Iterate over a list. |
| 1588 | 1607 |
| 1589 ``` | 1608 ``` |
| 1590 foreach(<loop_var>, <list>) { | 1609 foreach(<loop_var>, <list>) { |
| 1591 <loop contents> | 1610 <loop contents> |
| 1592 } | 1611 } |
| 1593 | 1612 |
| 1594 Executes the loop contents block over each item in the list, | 1613 Executes the loop contents block over each item in the list, |
| 1595 assigning the loop_var to each item in sequence. | 1614 assigning the loop_var to each item in sequence. The loop_var will be |
| 1615 a copy so assigning to it will not mutate the list. |
| 1596 | 1616 |
| 1597 The block does not introduce a new scope, so that variable assignments | 1617 The block does not introduce a new scope, so that variable assignments |
| 1598 inside the loop will be visible once the loop terminates. | 1618 inside the loop will be visible once the loop terminates. |
| 1599 | 1619 |
| 1600 The loop variable will temporarily shadow any existing variables with | 1620 The loop variable will temporarily shadow any existing variables with |
| 1601 the same name for the duration of the loop. After the loop terminates | 1621 the same name for the duration of the loop. After the loop terminates |
| 1602 the loop variable will no longer be in scope, and the previous value | 1622 the loop variable will no longer be in scope, and the previous value |
| 1603 (if any) will be restored. | 1623 (if any) will be restored. |
| 1604 | 1624 |
| 1605 ``` | 1625 ``` |
| (...skipping 4145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5751 ** -q**: Quiet mode. Don't print output on success. | 5771 ** -q**: Quiet mode. Don't print output on success. |
| 5752 ** \--root**: Explicitly specify source root. | 5772 ** \--root**: Explicitly specify source root. |
| 5753 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. | 5773 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. |
| 5754 ** \--threads**: Specify number of worker threads. | 5774 ** \--threads**: Specify number of worker threads. |
| 5755 ** \--time**: Outputs a summary of how long everything took. | 5775 ** \--time**: Outputs a summary of how long everything took. |
| 5756 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. | 5776 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. |
| 5757 ** -v**: Verbose logging. | 5777 ** -v**: Verbose logging. |
| 5758 ** \--version**: Prints the GN version number and exits. | 5778 ** \--version**: Prints the GN version number and exits. |
| 5759 | 5779 |
| 5760 ``` | 5780 ``` |
| OLD | NEW |