aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/alldocs.go
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2022-09-28 18:50:01 -0400
committerCherry Mui <cherryyz@google.com>2022-11-08 18:50:59 +0000
commit4b43b741710eb87cbae25f19cbde7eb733b08df1 (patch)
tree710192defbea90f565a646011e95925690fafcb6 /src/cmd/go/alldocs.go
parent41795528b0132170ec70a8e8ce0bcdb2e972e074 (diff)
downloadgo-4b43b741710eb87cbae25f19cbde7eb733b08df1.tar.gz
go-4b43b741710eb87cbae25f19cbde7eb733b08df1.zip
cmd/go: add -pgo build flag
Add a -pgo flag for "go build" (and other build actions), to specify the file path of a profile used for PGO. Special name "off" turns off PGO. The given profile path is passed to the compiler. The build cache is sensitive to the content of the given PGO profile. TODO: auto mode. For #55022. Change-Id: Ieee1b131b4c041f9502fd0a1acf112f3e44246be Reviewed-on: https://go-review.googlesource.com/c/go/+/438736 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/alldocs.go')
-rw-r--r--src/cmd/go/alldocs.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index 051cf25996a..821ebef3ac9 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -200,6 +200,9 @@
// include path must be in the same directory as the Go package they are
// included from, and overlays will not appear when binaries and tests are
// run through go run and go test respectively.
+// -pgo file
+// specify the file path of a profile for profile-guided optimization (PGO).
+// Special name "off" turns off PGO.
// -pkgdir dir
// install and load all packages from dir instead of the usual locations.
// For example, when building with a non-standard configuration,