[Mac/iOS/GN] Document the new rules for create_bundle and runtime_deps.

BUG=611414
R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2023003006
Cr-Original-Commit-Position: refs/heads/master@{#397258}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 57979207f98a847a40a8f5b57633cf7427c68c28
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md
index c596b27..59c54dc 100644
--- a/tools/gn/docs/reference.md
+++ b/tools/gn/docs/reference.md
@@ -736,7 +736,7 @@
   --root-target=<target_name>
       Name of the root target for which the QtCreator project will be
       generated to contain files of it and its dependencies. If unset, 
-      the whole build graph will be omitted.
+      the whole build graph will be emitted.
 
 
 ```
@@ -1418,6 +1418,12 @@
   generate iOS/OS X bundle. In cross-platform projects, it is advised to
   put it behind iOS/Mac conditionals.
 
+  If a create_bundle is specified as a data_deps for another target, the
+  bundle is considered a leaf, and its public and private dependencies
+  will not contribute to any data or data_deps. Required runtime
+  dependencies should be placed in the bundle. A create_bundle can
+  declare its own explicit data and data_deps, however.
+
 ```
 
 ### **Variables**
@@ -2558,6 +2564,7 @@
 
 ### **Variables**
 
+### **complete_static_lib**
 ```
   Flags: cflags, cflags_c, cflags_cc, cflags_objc, cflags_objcc,
          asmflags, defines, include_dirs, ldflags, lib_dirs, libs,
@@ -4397,6 +4404,9 @@
   However, no verification is done on these so GN doesn't enforce this.
   The paths are just rebased and passed along when requested.
 
+  Note: On iOS and OS X, create_bundle targets will not be recursed
+  into when gathering data. See "gn help create_bundle" for details.
+
   See "gn help runtime_deps" for how these are used.
 
 
@@ -4413,6 +4423,10 @@
   This is normally used for things like plugins or helper programs that
   a target needs at runtime.
 
+  Note: On iOS and OS X, create_bundle targets will not be recursed
+  into when gathering data_deps. See "gn help create_bundle" for
+  details.
+
   See also "gn help deps" and "gn help data".
 
 ```
diff --git a/tools/gn/functions_target.cc b/tools/gn/functions_target.cc
index a5f5574..645c24a 100644
--- a/tools/gn/functions_target.cc
+++ b/tools/gn/functions_target.cc
@@ -328,6 +328,12 @@
     "  generate iOS/OS X bundle. In cross-platform projects, it is advised to\n"
     "  put it behind iOS/Mac conditionals.\n"
     "\n"
+    "  If a create_bundle is specified as a data_deps for another target, the\n"
+    "  bundle is considered a leaf, and its public and private dependencies\n"
+    "  will not contribute to any data or data_deps. Required runtime\n"
+    "  dependencies should be placed in the bundle. A create_bundle can\n"
+    "  declare its own explicit data and data_deps, however.\n"
+    "\n"
     "Variables\n"
     "\n"
     "  bundle_root_dir*, bundle_resources_dir*, bundle_executable_dir*,\n"
diff --git a/tools/gn/variables.cc b/tools/gn/variables.cc
index a65d940..0eb5aab 100644
--- a/tools/gn/variables.cc
+++ b/tools/gn/variables.cc
@@ -812,6 +812,9 @@
     "  However, no verification is done on these so GN doesn't enforce this.\n"
     "  The paths are just rebased and passed along when requested.\n"
     "\n"
+    "  Note: On iOS and OS X, create_bundle targets will not be recursed\n"
+    "  into when gathering data. See \"gn help create_bundle\" for details.\n"
+    "\n"
     "  See \"gn help runtime_deps\" for how these are used.\n";
 
 const char kDataDeps[] = "data_deps";
@@ -829,6 +832,10 @@
     "  This is normally used for things like plugins or helper programs that\n"
     "  a target needs at runtime.\n"
     "\n"
+    "  Note: On iOS and OS X, create_bundle targets will not be recursed\n"
+    "  into when gathering data_deps. See \"gn help create_bundle\" for\n"
+    "  details.\n"
+    "\n"
     "  See also \"gn help deps\" and \"gn help data\".\n"
     "\n"
     "Example\n"