| 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 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 | 1327 |
| 1328 ### **Examples** | 1328 ### **Examples** |
| 1329 | 1329 |
| 1330 ``` | 1330 ``` |
| 1331 bundle_data("icudata") { | 1331 bundle_data("icudata") { |
| 1332 sources = [ "sources/data/in/icudtl.dat" ] | 1332 sources = [ "sources/data/in/icudtl.dat" ] |
| 1333 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ] | 1333 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ] |
| 1334 } | 1334 } |
| 1335 | 1335 |
| 1336 bundle_data("base_unittests_bundle_data]") { | 1336 bundle_data("base_unittests_bundle_data]") { |
| 1337 sources = [ "test/data" ] | 1337 sources = [ "test/data" ] |
| 1338 outputs = [ | 1338 outputs = [ |
| 1339 "{{bundle_resources_dir}}/{{source_root_relative_dir}}/" + | 1339 "{{bundle_resources_dir}}/{{source_root_relative_dir}}/" + |
| 1340 "{{source_file_part}}" | 1340 "{{source_file_part}}" |
| 1341 ] | 1341 ] |
| 1342 } | 1342 } |
| 1343 | 1343 |
| 1344 bundle_data("material_typography_bundle_data") { | 1344 bundle_data("material_typography_bundle_data") { |
| 1345 sources = [ | 1345 sources = [ |
| 1346 "src/MaterialTypography.bundle/Roboto-Bold.ttf", | 1346 "src/MaterialTypography.bundle/Roboto-Bold.ttf", |
| 1347 "src/MaterialTypography.bundle/Roboto-Italic.ttf", | 1347 "src/MaterialTypography.bundle/Roboto-Italic.ttf", |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 The code_signing_args will be passed as is to the script (so path have | 1493 The code_signing_args will be passed as is to the script (so path have |
| 1494 to be rebased) and additional inputs may be listed with the variable | 1494 to be rebased) and additional inputs may be listed with the variable |
| 1495 code_signing_sources. | 1495 code_signing_sources. |
| 1496 | 1496 |
| 1497 ``` | 1497 ``` |
| 1498 | 1498 |
| 1499 ### **Variables** | 1499 ### **Variables** |
| 1500 | 1500 |
| 1501 ``` | 1501 ``` |
| 1502 bundle_root_dir*, bundle_resources_dir*, bundle_executable_dir*, | 1502 bundle_root_dir*, bundle_resources_dir*, bundle_executable_dir*, |
| 1503 bundle_plugins_dir*, deps, data_deps, public_deps, visibility, | 1503 bundle_plugins_dir*, bundle_deps_filter, deps, data_deps, public_deps, |
| 1504 product_type, code_signing_args, code_signing_script, | 1504 visibility, product_type, code_signing_args, code_signing_script, |
| 1505 code_signing_sources, code_signing_outputs | 1505 code_signing_sources, code_signing_outputs |
| 1506 * = required | 1506 * = required |
| 1507 | 1507 |
| 1508 ``` | 1508 ``` |
| 1509 | 1509 |
| 1510 ### **Example** | 1510 ### **Example** |
| 1511 | 1511 |
| 1512 ``` | 1512 ``` |
| 1513 # Defines a template to create an application. On most platform, this | 1513 # Defines a template to create an application. On most platform, this |
| 1514 # is just an alias for an "executable" target, but on iOS/OS X, it | 1514 # is just an alias for an "executable" target, but on iOS/OS X, it |
| (...skipping 3308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4823 propagated across all types of targets, and public_configs | 4823 propagated across all types of targets, and public_configs |
| 4824 are always propagated across public deps of all types of targets. | 4824 are always propagated across public deps of all types of targets. |
| 4825 | 4825 |
| 4826 Data dependencies are propagated differently. See | 4826 Data dependencies are propagated differently. See |
| 4827 "gn help data_deps" and "gn help runtime_deps". | 4827 "gn help data_deps" and "gn help runtime_deps". |
| 4828 | 4828 |
| 4829 See also "public_deps". | 4829 See also "public_deps". |
| 4830 | 4830 |
| 4831 | 4831 |
| 4832 ``` | 4832 ``` |
| 4833 ## **bundle_deps_filter**: [label list] A list of labels that are filtered out. |
| 4834 |
| 4835 ``` |
| 4836 A list of target labels. |
| 4837 |
| 4838 This list contains target label patterns that should be filtered out |
| 4839 when creating the bundle. Any target matching one of those label will |
| 4840 be removed from the dependencies of the create_bundle target. |
| 4841 |
| 4842 This is mostly useful when creating application extension bundle as |
| 4843 the application extension has access to runtime resources from the |
| 4844 application bundle and thus do not require a second copy. |
| 4845 |
| 4846 See "gn help create_bundle" for more information. |
| 4847 |
| 4848 ``` |
| 4849 |
| 4850 ### **Example** |
| 4851 |
| 4852 ``` |
| 4853 create_bundle("today_extension") { |
| 4854 deps = [ |
| 4855 "//base" |
| 4856 ] |
| 4857 bundle_root_dir = "$root_out_dir/today_extension.appex" |
| 4858 bundle_deps_filter = [ |
| 4859 # The extension uses //base but does not use any function calling |
| 4860 # into third_party/icu and thus does not need the icudtl.dat file. |
| 4861 "//third_party/icu:icudata", |
| 4862 ] |
| 4863 } |
| 4864 |
| 4865 |
| 4866 ``` |
| 4833 ## **include_dirs**: Additional include directories. | 4867 ## **include_dirs**: Additional include directories. |
| 4834 | 4868 |
| 4835 ``` | 4869 ``` |
| 4836 A list of source directories. | 4870 A list of source directories. |
| 4837 | 4871 |
| 4838 The directories in this list will be added to the include path for | 4872 The directories in this list will be added to the include path for |
| 4839 the files in the affected target. | 4873 the files in the affected target. |
| 4840 | 4874 |
| 4841 ``` | 4875 ``` |
| 4842 | 4876 |
| (...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6321 ** \--root**: Explicitly specify source root. | 6355 ** \--root**: Explicitly specify source root. |
| 6322 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. | 6356 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. |
| 6323 ** \--script-executable**: Set the executable used to execute scripts. | 6357 ** \--script-executable**: Set the executable used to execute scripts. |
| 6324 ** \--threads**: Specify number of worker threads. | 6358 ** \--threads**: Specify number of worker threads. |
| 6325 ** \--time**: Outputs a summary of how long everything took. | 6359 ** \--time**: Outputs a summary of how long everything took. |
| 6326 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. | 6360 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. |
| 6327 ** -v**: Verbose logging. | 6361 ** -v**: Verbose logging. |
| 6328 ** \--version**: Prints the GN version number and exits. | 6362 ** \--version**: Prints the GN version number and exits. |
| 6329 | 6363 |
| 6330 ``` | 6364 ``` |
| OLD | NEW |