]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/testcarchive: fix path of libgo.a for darwin/arm
authorCherry Zhang <cherryyz@google.com>
Wed, 27 Apr 2016 19:44:22 +0000 (15:44 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Wed, 27 Apr 2016 20:07:12 +0000 (20:07 +0000)
After CL 22461, c-archive build on darwin/arm is by default compiled
with -shared, so update the install path.

Fix build.

Change-Id: Ie93dbd226ed416b834da0234210f4b98bc0e3606
Reviewed-on: https://go-review.googlesource.com/22507
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

misc/cgo/testcarchive/carchive_test.go

index 72e9ef1d591c0488272408aba5104fe3c30ba785..19c746d49a5e97ad920a1fc798fea364927aaa12 100644 (file)
@@ -147,7 +147,11 @@ func TestInstall(t *testing.T) {
                t.Fatal(err)
        }
 
-       compilemain(t, filepath.Join("pkg", GOOS+"_"+GOARCH, "libgo.a"))
+       libgopath := filepath.Join("pkg", GOOS+"_"+GOARCH, "libgo.a")
+       if GOOS == "darwin" && GOARCH == "arm" {
+               libgopath = filepath.Join("pkg", GOOS+"_"+GOARCH+"_shared", "libgo.a")
+       }
+       compilemain(t, libgopath)
 
        binArgs := append(bin, "arg1", "arg2")
        if out, err := exec.Command(binArgs[0], binArgs[1:]...).CombinedOutput(); err != nil {