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

Side by Side Diff: tools/gn/docs/reference.md

Issue 2205693005: Add bundle_deps_filter to create_bundle targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build/config/ios/rules.gni. Created 4 years, 4 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
OLDNEW
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
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
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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 2015
2016 The result will never end in a slash, so if the resulting 2016 The result will never end in a slash, so if the resulting
2017 is empty, the system ("/") or source ("//") roots, a "." 2017 is empty, the system ("/") or source ("//") roots, a "."
2018 will be appended such that it is always legal to append a slash 2018 will be appended such that it is always legal to append a slash
2019 and a filename and get a valid path. 2019 and a filename and get a valid path.
2020 2020
2021 "out_dir" 2021 "out_dir"
2022 The output file directory corresponding to the path of the 2022 The output file directory corresponding to the path of the
2023 given file, not including a trailing slash. 2023 given file, not including a trailing slash.
2024 "//foo/bar/baz.txt" => "//out/Default/obj/foo/bar" 2024 "//foo/bar/baz.txt" => "//out/Default/obj/foo/bar"
2025
2025 "gen_dir" 2026 "gen_dir"
2026 The generated file directory corresponding to the path of the 2027 The generated file directory corresponding to the path of the
2027 given file, not including a trailing slash. 2028 given file, not including a trailing slash.
2028 "//foo/bar/baz.txt" => "//out/Default/gen/foo/bar" 2029 "//foo/bar/baz.txt" => "//out/Default/gen/foo/bar"
2029 2030
2030 "abspath" 2031 "abspath"
2031 The full absolute path name to the file or directory. It will be 2032 The full absolute path name to the file or directory. It will be
2032 resolved relative to the current directory, and then the source- 2033 resolved relative to the current directory, and then the source-
2033 absolute version will be returned. If the input is system- 2034 absolute version will be returned. If the input is system-
2034 absolute, the same input will be returned. 2035 absolute, the same input will be returned.
(...skipping 2803 matching lines...) Expand 10 before | Expand all | Expand 10 after
4838 propagated across all types of targets, and public_configs 4839 propagated across all types of targets, and public_configs
4839 are always propagated across public deps of all types of targets. 4840 are always propagated across public deps of all types of targets.
4840 4841
4841 Data dependencies are propagated differently. See 4842 Data dependencies are propagated differently. See
4842 "gn help data_deps" and "gn help runtime_deps". 4843 "gn help data_deps" and "gn help runtime_deps".
4843 4844
4844 See also "public_deps". 4845 See also "public_deps".
4845 4846
4846 4847
4847 ``` 4848 ```
4849 ## **bundle_deps_filter**: [label list] A list of labels that are filtered out.
4850
4851 ```
4852 A list of target labels.
4853
4854 This list contains target label patterns that should be filtered out
4855 when creating the bundle. Any target matching one of those label will
4856 be removed from the dependencies of the create_bundle target.
4857
4858 This is mostly useful when creating application extension bundle as
4859 the application extension has access to runtime resources from the
4860 application bundle and thus do not require a second copy.
4861
4862 See "gn help create_bundle" for more information.
4863
4864 ```
4865
4866 ### **Example**
4867
4868 ```
4869 create_bundle("today_extension") {
4870 deps = [
4871 "//base"
4872 ]
4873 bundle_root_dir = "$root_out_dir/today_extension.appex"
4874 bundle_deps_filter = [
4875 # The extension uses //base but does not use any function calling
4876 # into third_party/icu and thus does not need the icudtl.dat file.
4877 "//third_party/icu:icudata",
4878 ]
4879 }
4880
4881
4882 ```
4848 ## **include_dirs**: Additional include directories. 4883 ## **include_dirs**: Additional include directories.
4849 4884
4850 ``` 4885 ```
4851 A list of source directories. 4886 A list of source directories.
4852 4887
4853 The directories in this list will be added to the include path for 4888 The directories in this list will be added to the include path for
4854 the files in the affected target. 4889 the files in the affected target.
4855 4890
4856 ``` 4891 ```
4857 4892
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
6336 ** \--root**: Explicitly specify source root. 6371 ** \--root**: Explicitly specify source root.
6337 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file. 6372 ** \--runtime-deps-list-file**: Save runtime dependencies for targets in file.
6338 ** \--script-executable**: Set the executable used to execute scripts. 6373 ** \--script-executable**: Set the executable used to execute scripts.
6339 ** \--threads**: Specify number of worker threads. 6374 ** \--threads**: Specify number of worker threads.
6340 ** \--time**: Outputs a summary of how long everything took. 6375 ** \--time**: Outputs a summary of how long everything took.
6341 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file. 6376 ** \--tracelog**: Writes a Chrome-compatible trace log to the given file.
6342 ** -v**: Verbose logging. 6377 ** -v**: Verbose logging.
6343 ** \--version**: Prints the GN version number and exits. 6378 ** \--version**: Prints the GN version number and exits.
6344 6379
6345 ``` 6380 ```
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698