From a361ef36af4812815c02dd026c4672837442bf44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=B6hrmann?= Date: Sun, 28 Oct 2018 15:37:13 +0100 Subject: [PATCH] runtime: support GODEBUGCPU for more Unix-like operating systems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Run-TryBot: Martin Möhrmann TryBot-Result: Gobot Gobot --- src/runtime/proc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 844e0237157..365e516ec8a 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -483,7 +483,8 @@ func cpuinit() { const prefix = "GODEBUGCPU=" var env string - if GOOS == "linux" || GOOS == "darwin" { + switch GOOS { + case "aix", "darwin", "dragonfly", "freebsd", "netbsd", "openbsd", "solaris", "linux": cpu.DebugOptions = true // Similar to goenv_unix but extracts the environment value for