aboutsummaryrefslogtreecommitdiff
path: root/src/internal/cpu/cpu.go
diff options
context:
space:
mode:
authorMartin Möhrmann <moehrmann@google.com>2018-10-12 16:48:38 +0200
committerMartin Möhrmann <moehrmann@google.com>2018-10-12 15:40:45 +0000
commita5248acd91dcf0e90a68c1ff88ca389dc034557c (patch)
tree51be9113ffdd5b494e0f2ad1093454a4e8c8103f /src/internal/cpu/cpu.go
parentda6c168378b4c1deb2a731356f1f438e4723b8a7 (diff)
downloadgo-a5248acd91dcf0e90a68c1ff88ca389dc034557c.tar.xz
internal/cpu: enable support for GODEBUGCPU in non-experimental builds
Enabling GODEBUGCPU without the need to set GOEXPERIMENT=debugcpu enables trybots and builders to run tests for GODEBUGCPU features in upcoming CLs that will implement the new syntax and features for non-experimental GODEBUGCPU support from proposal golang.org/issue/27218. Updates #27218 Change-Id: Icc69e51e736711a86b02b46bd441ffc28423beba Reviewed-on: https://go-review.googlesource.com/c/141817 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/internal/cpu/cpu.go')
-rw-r--r--src/internal/cpu/cpu.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/internal/cpu/cpu.go b/src/internal/cpu/cpu.go
index bfb016c7f7..54b100b1d4 100644
--- a/src/internal/cpu/cpu.go
+++ b/src/internal/cpu/cpu.go
@@ -6,8 +6,7 @@
// used by the Go standard library.
package cpu
-// DebugOptions is set to true by the runtime if go was compiled with GOEXPERIMENT=debugcpu
-// and GOOS is Linux or Darwin.
+// DebugOptions is set to true by the runtime if the OS supports GODEBUGCPU.
// This should not be changed after it is initialized.
var DebugOptions bool
@@ -139,8 +138,7 @@ type s390x struct {
// Initialize examines the processor and sets the relevant variables above.
// This is called by the runtime package early in program initialization,
-// before normal init functions are run. env is set by runtime on Linux and Darwin
-// if go was compiled with GOEXPERIMENT=debugcpu.
+// before normal init functions are run. env is set by runtime if the OS supports GODEBUGCPU.
func Initialize(env string) {
doinit()
processOptions(env)