Doc: Fix toolchain typo and clarify the toolchain syntax Backport of https://chromium-review.googlesource.com/c/chromium/src/+/1104159 which was made to tools/gn since forking to standalone repo. Change-Id: Ib11bc45c89c5d69305cd8aa39c63dd48a070be52 Reviewed-on: https://gn-review.googlesource.com/1841 Reviewed-by: Brett Wilson <brettw@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md index a982120..c773afe 100644 --- a/tools/gn/docs/reference.md +++ b/tools/gn/docs/reference.md
@@ -6028,11 +6028,12 @@ "//foo/bar/*" (all targets in any subdir of //foo/bar) "./*" (all targets in the current build file or sub dirs) - Any of the above forms can additionally take an explicit toolchain. In this - case, the toolchain must be fully qualified (no wildcards are supported in - the toolchain name). + Any of the above forms can additionally take an explicit toolchain + in parenthesis at the end of the label pattern. In this case, the + toolchain must be fully qualified (no wildcards are supported in the + toolchain name). - "//foo:bar(//build/toochain:mac)" + "//foo:bar(//build/toolchain:mac)" An explicit target in an explicit toolchain. ":*(//build/toolchain/linux:32bit)"
diff --git a/tools/gn/label_pattern.cc b/tools/gn/label_pattern.cc index 61a19b9..f5e6b9c 100644 --- a/tools/gn/label_pattern.cc +++ b/tools/gn/label_pattern.cc
@@ -33,11 +33,12 @@ "//foo/bar/*" (all targets in any subdir of //foo/bar) "./*" (all targets in the current build file or sub dirs) - Any of the above forms can additionally take an explicit toolchain. In this - case, the toolchain must be fully qualified (no wildcards are supported in - the toolchain name). + Any of the above forms can additionally take an explicit toolchain + in parenthesis at the end of the label pattern. In this case, the + toolchain must be fully qualified (no wildcards are supported in the + toolchain name). - "//foo:bar(//build/toochain:mac)" + "//foo:bar(//build/toolchain:mac)" An explicit target in an explicit toolchain. ":*(//build/toolchain/linux:32bit)"