| 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 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2150 idl("foo") {... | 2150 idl("foo") {... |
| 2151 you will normally want this to expand to something defining a | 2151 you will normally want this to expand to something defining a |
| 2152 source_set or static_library named "foo" (among other things you may | 2152 source_set or static_library named "foo" (among other things you may |
| 2153 need). This way, when another target specifies a dependency on | 2153 need). This way, when another target specifies a dependency on |
| 2154 "foo", the static_library or source_set will be linked. | 2154 "foo", the static_library or source_set will be linked. |
| 2155 | 2155 |
| 2156 It is also important that any other targets your template expands to | 2156 It is also important that any other targets your template expands to |
| 2157 have globally unique names, or you will get collisions. | 2157 have globally unique names, or you will get collisions. |
| 2158 | 2158 |
| 2159 Access the invoking name in your template via the implicit | 2159 Access the invoking name in your template via the implicit |
| 2160 "target_name" variable. This should also be the basis of how other | 2160 "target_name" variable. This should also be the basis for how other |
| 2161 targets that a template expands to to ensure uniquness. | 2161 targets that a template expands to ensure uniqueness. |
| 2162 | 2162 |
| 2163 A typical example would be a template that defines an action to | 2163 A typical example would be a template that defines an action to |
| 2164 generate some source files, and a source_set to compile that source. | 2164 generate some source files, and a source_set to compile that source. |
| 2165 Your template would name the source_set "target_name" because | 2165 Your template would name the source_set "target_name" because |
| 2166 that's what you want external targets to depend on to link your code. | 2166 that's what you want external targets to depend on to link your code. |
| 2167 And you would name the action something like "${target_name}_action" | 2167 And you would name the action something like "${target_name}_action" |
| 2168 to make it unique. The source set would have a dependency on the | 2168 to make it unique. The source set would have a dependency on the |
| 2169 action to make it run. | 2169 action to make it run. |
| 2170 | 2170 |
| 2171 ``` | 2171 ``` |
| (...skipping 2652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4824 ** \--nocolor**: Force non-colored output. | 4824 ** \--nocolor**: Force non-colored output. |
| 4825 ** -q**: Quiet mode. Don't print output on success. | 4825 ** -q**: Quiet mode. Don't print output on success. |
| 4826 ** \--root**: Explicitly specify source root. | 4826 ** \--root**: Explicitly specify source root. |
| 4827 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. | 4827 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. |
| 4828 ** \--time**: Outputs a summary of how long everything took. | 4828 ** \--time**: Outputs a summary of how long everything took. |
| 4829 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. | 4829 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. |
| 4830 ** -v**: Verbose logging. | 4830 ** -v**: Verbose logging. |
| 4831 ** \--version**: Prints the GN version number and exits. | 4831 ** \--version**: Prints the GN version number and exits. |
| 4832 | 4832 |
| 4833 ``` | 4833 ``` |
| OLD | NEW |