]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link/internal/amd64: -buildmode=c-archive forces external link mode
authorIan Lance Taylor <iant@golang.org>
Tue, 26 May 2015 20:49:59 +0000 (13:49 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 26 May 2015 21:49:45 +0000 (21:49 +0000)
At some point this code should probably move to cmd/link/internal/ld,
but at least for now just handle c-archive like c-shared.

Change-Id: Ic17656529cb0fe189a37f15e670350ab13bb5276
Reviewed-on: https://go-review.googlesource.com/10385
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/cmd/link/internal/amd64/obj.go

index e489bb75a9dd8cd07c4f54151c0f7ab62a4fc7f5..bb65067e874aa754542382f34e337bd428fba01e 100644 (file)
@@ -90,7 +90,7 @@ func archinit() {
                ld.Linkmode = ld.LinkInternal
        }
 
-       if ld.Buildmode == ld.BuildmodeCShared || ld.DynlinkingGo() {
+       if ld.Buildmode == ld.BuildmodeCArchive || ld.Buildmode == ld.BuildmodeCShared || ld.DynlinkingGo() {
                ld.Linkmode = ld.LinkExternal
        }