mirror of
https://github.com/golang/go
synced 2024-11-18 08:54:45 -07:00
cmd/compilebench: make StdCmd respect compiler flags flag
Change-Id: I9230492805583092c52ccc87e3be7740ba794c3f Reviewed-on: https://go-review.googlesource.com/40652 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
9bf174b4d3
commit
cbb995d093
@ -175,7 +175,12 @@ func runCmd(name string, cmd *exec.Cmd) {
|
||||
}
|
||||
|
||||
func runStdCmd() {
|
||||
cmd := exec.Command("go", "build", "-a", "std", "cmd")
|
||||
args := []string{"build", "-a"}
|
||||
if *flagCompilerFlags != "" {
|
||||
args = append(args, "-gcflags", *flagCompilerFlags)
|
||||
}
|
||||
args = append(args, "std", "cmd")
|
||||
cmd := exec.Command("go", args...)
|
||||
cmd.Dir = filepath.Join(runtime.GOROOT(), "src")
|
||||
runCmd("BenchmarkStdCmd", cmd)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user