Index: tools/gn/docs/reference.md |
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md |
index 38e8ce75585548facfba40e50b0ff017b9fd6e3d..600daea97cc8f4fe3519bbf1b18a10a7af59fc4d 100644 |
--- a/tools/gn/docs/reference.md |
+++ b/tools/gn/docs/reference.md |
@@ -3003,6 +3003,7 @@ |
Example: "gen/base/test" |
Linker tools have multiple inputs and (potentially) multiple outputs |
+ The static library tool ("alink") is not considered a linker tool. |
The following expansions are available: |
{{inputs}} |
@@ -3062,6 +3063,9 @@ |
These should generally be treated the same as libs by your tool. |
Example: "libfoo.so libbar.so" |
+ The static library ("alink") tool allows {{arflags}} plus the common |
+ tool substitutions. |
+ |
The copy tool allows the common compiler/linker substitutions, plus |
{{source}} which is the source of the copy. The stamp tool allows |
only the common tool substitutions. |
@@ -3725,6 +3729,42 @@ |
``` |
+## **arflags**: Arguments passed to static_library archiver. |
+ |
+``` |
+ A list of flags passed to the archive/lib command that creates static |
+ libraries. |
+ |
+ arflags are NOT pushed to dependents, so applying arflags to source |
+ sets or any other target type will be a no-op. As with ldflags, |
+ you could put the arflags in a config and set that as a public or |
+ "all dependent" config, but that will likely not be what you want. |
+ If you have a chain of static libraries dependent on each other, |
+ this can cause the flags to propagate up to other static libraries. |
+ Due to the nature of how arflags are typically used, you will normally |
+ want to apply them directly on static_library targets themselves. |
+ |
+``` |
+ |
+### **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. |
+ |
+ |
+``` |
## **args**: Arguments passed to an action. |
``` |