1
0
mirror of https://github.com/golang/go synced 2024-09-30 04:34:33 -06:00

cmd/dist: remove support for macOS 10.9 and earlier

Updates #23122

Change-Id: I14cfb83f3f78cdbe5880bd29209388ad12b9ee89
Reviewed-on: https://go-review.googlesource.com/115236
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Tobias Klauser 2018-05-30 10:10:08 +02:00 committed by Brad Fitzpatrick
parent e023d5b0ac
commit 679004f484

26
src/cmd/dist/main.go vendored
View File

@ -9,7 +9,6 @@ import (
"fmt"
"os"
"runtime"
"strconv"
"strings"
)
@ -61,6 +60,8 @@ func main() {
// Even on 64-bit platform, darwin uname -m prints i386.
// We don't support any of the OS X versions that run on 32-bit-only hardware anymore.
gohostarch = "amd64"
// macOS 10.9 and later require clang
defaultclang = true
case "freebsd":
// Since FreeBSD 10 gcc is no longer part of the base system.
defaultclang = true
@ -126,29 +127,6 @@ func main() {
}
bginit()
// The OS X 10.6 linker does not support external linking mode.
// See golang.org/issue/5130.
//
// OS X 10.6 does not work with clang either, but OS X 10.9 requires it.
// It seems to work with OS X 10.8, so we default to clang for 10.8 and later.
// See golang.org/issue/5822.
//
// Roughly, OS X 10.N shows up as uname release (N+4),
// so OS X 10.6 is uname version 10 and OS X 10.8 is uname version 12.
if gohostos == "darwin" {
rel := run("", CheckExit, "uname", "-r")
if i := strings.Index(rel, "."); i >= 0 {
rel = rel[:i]
}
osx, _ := strconv.Atoi(rel)
if osx <= 6+4 {
goextlinkenabled = "0"
}
if osx >= 8+4 {
defaultclang = true
}
}
if len(os.Args) > 1 && os.Args[1] == "-check-goarm" {
useVFPv1() // might fail with SIGILL
println("VFPv1 OK.")