From e101d8396ddb192ad3ce96c21bcfb82430ea044b Mon Sep 17 00:00:00 2001 From: moncho <50428+moncho@users.noreply.github.com> Date: Sat, 19 Dec 2020 11:16:44 +0100 Subject: [PATCH] portlist, version: update build tags for Go 1.16, Apple M1 Build tags have been updated to build native Apple M1 binaries, existing build tags for ios have been changed from darwin,arm64 to ios,arm64. With this change, running go build cmd/tailscale{,d}/tailscale{,d}.go on an Apple machine with the new processor works and resulting binaries show the expected architecture, e.g. tailscale: Mach-O 64-bit executable arm64. Tested using go version go1.16beta1 darwin/arm64. Updates #943 Signed-off-by: moncho <50428+moncho@users.noreply.github.com> --- portlist/netstat.go | 2 +- portlist/netstat_exec.go | 2 +- portlist/portlist_ios.go | 2 +- portlist/portlist_macos.go | 2 +- version/cmdname.go | 2 +- version/cmdname_ios.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/portlist/netstat.go b/portlist/netstat.go index e0f9345be..02b1a5957 100644 --- a/portlist/netstat.go +++ b/portlist/netstat.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !darwin !arm64 +// +build go1.16,!ios !go1.16,!darwin !go1.16,!arm64 package portlist diff --git a/portlist/netstat_exec.go b/portlist/netstat_exec.go index 2ca3fd574..dd78215ec 100644 --- a/portlist/netstat_exec.go +++ b/portlist/netstat_exec.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build windows freebsd openbsd darwin,amd64 +// +build windows freebsd openbsd darwin,amd64 go1.16,darwin,arm64 package portlist diff --git a/portlist/portlist_ios.go b/portlist/portlist_ios.go index a7a85a54c..19bc2db39 100644 --- a/portlist/portlist_ios.go +++ b/portlist/portlist_ios.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin,!amd64 +// +build go1.16,ios !go1.16,darwin,!amd64 package portlist diff --git a/portlist/portlist_macos.go b/portlist/portlist_macos.go index 66bd558b8..86dd3058e 100644 --- a/portlist/portlist_macos.go +++ b/portlist/portlist_macos.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin,amd64 +// +build darwin,amd64 go1.16,darwin,arm64 package portlist diff --git a/version/cmdname.go b/version/cmdname.go index a7899ed9f..832563532 100644 --- a/version/cmdname.go +++ b/version/cmdname.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !darwin !arm64 +// +build go1.16,!ios !go1.16,!darwin !go1.16,!arm64 package version diff --git a/version/cmdname_ios.go b/version/cmdname_ios.go index 69d71f7db..514da5da0 100644 --- a/version/cmdname_ios.go +++ b/version/cmdname_ios.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin,arm64 +// +build go1.16,ios !go1.16,darwin,arm64 package version