]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/ld: don't use linkname before 1.12
authorIan Lance Taylor <iant@golang.org>
Wed, 13 Oct 2021 19:46:33 +0000 (12:46 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 14 Oct 2021 04:18:44 +0000 (04:18 +0000)
commit9e4dc6f37f75840d1193accae697a0e9283f5384
tree64305bcf12506d0fcc7c87f68b9c91f47cbbc9e9
parent276fb279d1703451e5b962350727f84e4e8e9814
cmd/link/internal/ld: don't use linkname before 1.12

Before the 1.12 release the use of linkname did not prevent a compiler
error for an empty function body (see #23311). Add some build tags so
that cmd/link will build with earlier releases.

It's true that we currently require Go 1.16 as the bootstrap compiler (#44505).
But for this simple case keep things working with older compilers for now.

Change-Id: I67fe021406096c64c01d6e2c9adbcc4388988a6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/355690
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/link/internal/ld/outbuf_darwin.go
src/cmd/link/internal/ld/outbuf_nofallocate.go
src/cmd/link/internal/ld/outbuf_notdarwin.go