From 8df21a78027d54faa8014ce9040bd8007d1b23e0 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 12 Sep 2022 17:18:49 +0200 Subject: [PATCH] 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 Reviewed-by: Cherry Mui Run-TryBot: Tobias Klauser Reviewed-by: Ian Lance Taylor Auto-Submit: Tobias Klauser --- src/cmd/link/internal/ld/outbuf_darwin.go | 3 --- src/cmd/link/internal/ld/outbuf_nofallocate.go | 4 ++-- src/cmd/link/internal/ld/outbuf_notdarwin.go | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/cmd/link/internal/ld/outbuf_darwin.go b/src/cmd/link/internal/ld/outbuf_darwin.go index 9d8cb583e7..c0d994ea61 100644 --- a/src/cmd/link/internal/ld/outbuf_darwin.go +++ b/src/cmd/link/internal/ld/outbuf_darwin.go @@ -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 ( diff --git a/src/cmd/link/internal/ld/outbuf_nofallocate.go b/src/cmd/link/internal/ld/outbuf_nofallocate.go index 3bffe4543d..6564bd54a3 100644 --- a/src/cmd/link/internal/ld/outbuf_nofallocate.go +++ b/src/cmd/link/internal/ld/outbuf_nofallocate.go @@ -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 diff --git a/src/cmd/link/internal/ld/outbuf_notdarwin.go b/src/cmd/link/internal/ld/outbuf_notdarwin.go index 85e64421a3..f9caa413e3 100644 --- a/src/cmd/link/internal/ld/outbuf_notdarwin.go +++ b/src/cmd/link/internal/ld/outbuf_notdarwin.go @@ -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 -- 2.50.0