1
0
mirror of https://github.com/golang/go synced 2024-11-27 04:01:19 -07:00

runtime: support GODEBUGCPU for more Unix-like operating systems

Adds AIX, DragonFly BSD, FreeBSD, NetBSD, OpenBSD and Solaris
to the list of operating systems where the GODEBUGCPU environment
variable will be parsed and interal/cpu features can be enabled
and disabled.

Updates #27218

Change-Id: I9cd99142e2a5147cb00ca57b581f049ea6ce8508
Reviewed-on: https://go-review.googlesource.com/c/145281
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Martin Möhrmann <martisch@uos.de>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Martin Möhrmann 2018-10-28 15:37:13 +01:00 committed by Martin Möhrmann
parent cc36b835e4
commit a361ef36af

View File

@ -483,7 +483,8 @@ func cpuinit() {
const prefix = "GODEBUGCPU=" const prefix = "GODEBUGCPU="
var env string var env string
if GOOS == "linux" || GOOS == "darwin" { switch GOOS {
case "aix", "darwin", "dragonfly", "freebsd", "netbsd", "openbsd", "solaris", "linux":
cpu.DebugOptions = true cpu.DebugOptions = true
// Similar to goenv_unix but extracts the environment value for // Similar to goenv_unix but extracts the environment value for