cmd/link/internal/ld: drop Go 1.12 compatibility on darwin

Go 1.17 is the minimum required version for bootstrap as of Go 1.20.
Also, the package no longer builds with Go 1.12 used for bootstrap.
Thus, drop the Go 1.12 compatibility and used linkname unconditionally.

For #44505

Change-Id: Ic160aba4a33d580987b4633a3db03a025804d090
Reviewed-on: https://go-review.googlesource.com/c/go/+/430335
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
Tobias Klauser 2022-09-12 17:18:49 +02:00 committed by Gopher Robot
parent dad2966a83
commit 8df21a7802
3 changed files with 4 additions and 7 deletions

View file

@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build darwin && go1.12
// +build darwin,go1.12
package ld
import (

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build (!darwin && !linux) || (darwin && !go1.12)
// +build !darwin,!linux darwin,!go1.12
//go:build !darwin && !linux
// +build !darwin,!linux
package ld

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !darwin || (darwin && !go1.12)
// +build !darwin darwin,!go1.12
//go:build !darwin
// +build !darwin
package ld