mirror of
https://github.com/golang/go
synced 2024-11-20 00:34:43 -07:00
cmd/internal/obj/x86: look for go cmd in GOBIN if present.
If GOBIN is not empty the build moves the go executable to a new path. When this test runs it fails to find the go cmd in the GOROOT. Change-Id: I100def0fbcb9691b13776f795b1d1725e36d8102 Reviewed-on: https://go-review.googlesource.com/8735 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
fae4a128cb
commit
a2a8a0468a
@ -97,8 +97,13 @@ func asmOutput(t *testing.T, s string) []byte {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
gofolder := filepath.Join(build.Default.GOROOT, "bin")
|
||||
if gobin := os.Getenv("GOBIN"); len(gobin) != 0 {
|
||||
gofolder = gobin
|
||||
}
|
||||
|
||||
cmd := exec.Command(
|
||||
build.Default.GOROOT+"/bin/go", "tool", "asm", "-S", "-dynlink",
|
||||
filepath.Join(gofolder, "go"), "tool", "asm", "-S", "-dynlink",
|
||||
"-o", filepath.Join(tmpdir, "output.6"), tmpfile.Name())
|
||||
|
||||
var env []string
|
||||
|
Loading…
Reference in New Issue
Block a user