1
0
mirror of https://github.com/golang/go synced 2024-11-17 22:44:41 -07:00

cmd/dist, cmd/link: force external linking for shared libs on arm

Also run testcshared.

Fixes #12425

Change-Id: I5baea8d772d3462f945aab96260b4197dbb20c0a
Reviewed-on: https://go-review.googlesource.com/14143
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Michael Hudson-Doyle 2015-09-01 14:07:14 +12:00
parent e9089e4ab6
commit f7b66fffc5
2 changed files with 5 additions and 1 deletions

View File

@ -570,7 +570,7 @@ func (t *tester) supportedBuildmode(mode string) bool {
case "c-shared":
// TODO(hyangah): add linux-386.
switch pair {
case "linux-amd64", "darwin-amd64", "android-arm":
case "linux-amd64", "darwin-amd64", "android-arm", "linux-arm":
return true
}
return false

View File

@ -86,6 +86,10 @@ func archinit() {
ld.Linkmode = ld.LinkInternal
}
if ld.Buildmode == ld.BuildmodeCArchive || ld.Buildmode == ld.BuildmodeCShared || ld.DynlinkingGo() {
ld.Linkmode = ld.LinkExternal
}
switch ld.HEADTYPE {
default:
if ld.Linkmode == ld.LinkAuto {