| Index: tools/gn/docs/reference.md
|
| diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md
|
| index 97f12f21e1f531d378f612a2d11316798d7e5e7c..9cc04025f30033cdbf55614b4d74ffb390ffd992 100644
|
| --- a/tools/gn/docs/reference.md
|
| +++ b/tools/gn/docs/reference.md
|
| @@ -1329,6 +1329,9 @@
|
| ```
|
| forward_variables_from(from_scope, variable_list_or_star)
|
|
|
| + forward_variables_from(from_scope, variable_list_or_star,
|
| + variable_to_not_forward_list)
|
| +
|
| Copies the given variables from the given scope to the local scope
|
| if they exist. This is normally used in the context of templates to
|
| use the values of variables defined in the template invocation to
|
| @@ -1354,6 +1357,9 @@
|
| is never applied by this function. It's assumed than any desired
|
| filtering was already done when sources was set on the from_scope.
|
|
|
| + The second form of the function allows to give a list of variables not
|
| + to forward. This is mostly useful when used in combination with "*".
|
| +
|
| ```
|
|
|
| ### **Examples**
|
| @@ -1383,7 +1389,19 @@
|
| target(my_wrapper_target_type, target_name) {
|
| forward_variables_from(invoker, "*")
|
| }
|
| - }
|
| + }
|
| +
|
| + # This is a template around another template that uses a variable to
|
| + # initialize another variable and is only interested in that one.
|
| + template("my_ios_test_app") {
|
| + ios_test_app(target_name) {
|
| + forward_variables_from(invoker, "*", ["test_bundle_name"])
|
| + if (!defined(extra_substitutions)) {
|
| + extra_substitutions = []
|
| + }
|
| + extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$test_bundle_name" ]
|
| + }
|
| + }
|
|
|
|
|
| ```
|
|
|