summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorElias Naur <elias.naur@gmail.com>2016-05-07 07:24:39 +0200
committerElias Naur <elias.naur@gmail.com>2016-05-07 18:58:39 +0000
commitfa270ad98e77cd0625c97eb01ad01efe11a324e8 (patch)
tree6999960934a2c83ccb9112fd65e5bcb81349032e /misc
parent9d7c9b4384db01afd2acb27d3a4636b60e957f08 (diff)
downloadgo-git-fa270ad98e77cd0625c97eb01ad01efe11a324e8.tar.gz
cmd/go: add -shared to darwin/arm{,64} default build mode
Buildmode c-archive now supports position independent code for darwin/arm (in addition to darwin/arm64). Make PIC (-shared) the default for both platforms in the default buildmode. Without this change, gomobile will go install the standard library into its separate package directory without PIC support. Also add -shared to darwin/arm64 in buildmode c-archive, for symmetry (darwin/arm64 always generates position independent code). Fixes #15519 Change-Id: If27d2cbea8f40982e14df25da2703cbba572b5c6 Reviewed-on: https://go-review.googlesource.com/22920 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/cgo/testcarchive/carchive_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/cgo/testcarchive/carchive_test.go b/misc/cgo/testcarchive/carchive_test.go
index 0174e31015..ab14c007a9 100644
--- a/misc/cgo/testcarchive/carchive_test.go
+++ b/misc/cgo/testcarchive/carchive_test.go
@@ -84,7 +84,7 @@ func init() {
cc = append(cc, []string{"-framework", "CoreFoundation", "-framework", "Foundation"}...)
}
libgodir = GOOS + "_" + GOARCH
- if GOOS == "darwin" && GOARCH == "arm" {
+ if GOOS == "darwin" && (GOARCH == "arm" || GOARCH == "arm64") {
libgodir = GOOS + "_" + GOARCH + "_shared"
}
cc = append(cc, "-I", filepath.Join("pkg", libgodir))