Skip to content

Commit a9b653b

Browse files
committed
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 <[email protected]> Reviewed-by: David Chase <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Keith Randall <[email protected]> Run-TryBot: Keith Randall <[email protected]>
1 parent 4818d9e commit a9b653b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd/compilebench/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,9 @@ func (compile) long() bool { return false }
336336

337337
func (c compile) run(name string, count int) error {
338338
// Make sure dependencies needed by go tool compile are installed to GOROOT/pkg.
339-
out, err := exec.Command(*flagGoCmd, "build", "-i", c.dir).CombinedOutput()
339+
out, err := exec.Command(*flagGoCmd, "build", "-a", c.dir).CombinedOutput()
340340
if err != nil {
341-
return fmt.Errorf("go build -i %s: %v\n%s", c.dir, err, out)
341+
return fmt.Errorf("go build -a %s: %v\n%s", c.dir, err, out)
342342
}
343343

344344
// Find dir and source file list.
@@ -406,9 +406,9 @@ func (r link) run(name string, count int) error {
406406
}
407407

408408
// Build dependencies.
409-
out, err := exec.Command(*flagGoCmd, "build", "-i", "-o", "/dev/null", r.dir).CombinedOutput()
409+
out, err := exec.Command(*flagGoCmd, "build", "-a", "-o", "/dev/null", r.dir).CombinedOutput()
410410
if err != nil {
411-
return fmt.Errorf("go build -i %s: %v\n%s", r.dir, err, out)
411+
return fmt.Errorf("go build -a %s: %v\n%s", r.dir, err, out)
412412
}
413413

414414
// Build the main package.

0 commit comments

Comments
 (0)