tools/gn: update reference.md doc

This patch was generated by the following command line:

$ gn help --markdown all > tools/gn/docs/reference.md

BUG=None
R=dpranke@chromium.org

Review URL: https://codereview.chromium.org/1500923003

Cr-Original-Commit-Position: refs/heads/master@{#363298}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0cbfc07f673b7445fa43b2f115f1c79c07a6e1ca
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md
index a180d88..97f12f2 100644
--- a/tools/gn/docs/reference.md
+++ b/tools/gn/docs/reference.md
@@ -1431,7 +1431,7 @@
 
   "root_out_dir"
       The root of the output file tree for the target. This will
-      match the value of the "root_gen_dir" variable when inside that
+      match the value of the "root_out_dir" variable when inside that
       target's declaration.
 
   "label_no_toolchain"
@@ -3306,20 +3306,13 @@
 
 
 ```
-## **cflags***: Flags passed to the C compiler.
+## **asmflags**: Flags passed to the assembler.
 
 ```
   A list of strings.
 
-  "cflags" are passed to all invocations of the C, C++, Objective C,
-  and Objective C++ compilers.
-
-  To target one of these variants individually, use "cflags_c",
-  "cflags_cc", "cflags_objc", and "cflags_objcc",
-  respectively.
-
-  These variant-specific versions of cflags* will be appended to the
-  "cflags".
+  "asmflags" are passed to any invocation of a tool that takes an
+  .asm or .S file as input.
 
 ```
 
@@ -3352,10 +3345,10 @@
 
   To target one of these variants individually, use "cflags_c",
   "cflags_cc", "cflags_objc", and "cflags_objcc",
-  respectively.
+  respectively. These variant-specific versions of cflags* will be
+  appended on the compiler command line after "cflags".
 
-  These variant-specific versions of cflags* will be appended to the
-  "cflags".
+  See also "asmflags" for flags for assembly-language files.
 
 ```
 
@@ -3388,10 +3381,10 @@
 
   To target one of these variants individually, use "cflags_c",
   "cflags_cc", "cflags_objc", and "cflags_objcc",
-  respectively.
+  respectively. These variant-specific versions of cflags* will be
+  appended on the compiler command line after "cflags".
 
-  These variant-specific versions of cflags* will be appended to the
-  "cflags".
+  See also "asmflags" for flags for assembly-language files.
 
 ```
 
@@ -3424,10 +3417,10 @@
 
   To target one of these variants individually, use "cflags_c",
   "cflags_cc", "cflags_objc", and "cflags_objcc",
-  respectively.
+  respectively. These variant-specific versions of cflags* will be
+  appended on the compiler command line after "cflags".
 
-  These variant-specific versions of cflags* will be appended to the
-  "cflags".
+  See also "asmflags" for flags for assembly-language files.
 
 ```
 
@@ -3460,10 +3453,46 @@
 
   To target one of these variants individually, use "cflags_c",
   "cflags_cc", "cflags_objc", and "cflags_objcc",
-  respectively.
+  respectively. These variant-specific versions of cflags* will be
+  appended on the compiler command line after "cflags".
 
-  These variant-specific versions of cflags* will be appended to the
-  "cflags".
+  See also "asmflags" for flags for assembly-language files.
+
+```
+
+### **Ordering of flags and values**
+
+```
+  1. Those set on the current target (not in a config).
+  2. Those set on the "configs" on the target in order that the
+     configs appear in the list.
+  3. Those set on the "all_dependent_configs" on the target in order
+     that the configs appear in the list.
+  4. Those set on the "public_configs" on the target in order that
+     those configs appear in the list.
+  5. all_dependent_configs pulled from dependencies, in the order of
+     the "deps" list. This is done recursively. If a config appears
+     more than once, only the first occurance will be used.
+  6. public_configs pulled from dependencies, in the order of the
+     "deps" list. If a dependency is public, they will be applied
+     recursively.
+
+
+```
+## **cflags***: Flags passed to the C compiler.
+
+```
+  A list of strings.
+
+  "cflags" are passed to all invocations of the C, C++, Objective C,
+  and Objective C++ compilers.
+
+  To target one of these variants individually, use "cflags_c",
+  "cflags_cc", "cflags_objc", and "cflags_objcc",
+  respectively. These variant-specific versions of cflags* will be
+  appended on the compiler command line after "cflags".
+
+  See also "asmflags" for flags for assembly-language files.
 
 ```