cmd/compilebench: use -a instead of -i to ensure dependencies are built
-i has been deprecated since 1.15, and is now gone in the soon-to-be-1.20.
Change-Id: Ib570f2bcfd0b1feb937990b72e4c9e43e1ada8cd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/443456
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
diff --git a/cmd/compilebench/main.go b/cmd/compilebench/main.go
index 28dc450..abdf28a 100644
--- a/cmd/compilebench/main.go
+++ b/cmd/compilebench/main.go
@@ -336,9 +336,9 @@
func (c compile) run(name string, count int) error {
// Make sure dependencies needed by go tool compile are installed to GOROOT/pkg.
- out, err := exec.Command(*flagGoCmd, "build", "-i", c.dir).CombinedOutput()
+ out, err := exec.Command(*flagGoCmd, "build", "-a", c.dir).CombinedOutput()
if err != nil {
- return fmt.Errorf("go build -i %s: %v\n%s", c.dir, err, out)
+ return fmt.Errorf("go build -a %s: %v\n%s", c.dir, err, out)
}
// Find dir and source file list.
@@ -406,9 +406,9 @@
}
// Build dependencies.
- out, err := exec.Command(*flagGoCmd, "build", "-i", "-o", "/dev/null", r.dir).CombinedOutput()
+ out, err := exec.Command(*flagGoCmd, "build", "-a", "-o", "/dev/null", r.dir).CombinedOutput()
if err != nil {
- return fmt.Errorf("go build -i %s: %v\n%s", r.dir, err, out)
+ return fmt.Errorf("go build -a %s: %v\n%s", r.dir, err, out)
}
// Build the main package.