Commit 0cac5631 authored by Ian Lance Taylor's avatar Ian Lance Taylor

cmd/go: include experiments in compiler tool ID

No test because testing this would require building a new toolchain
with a different experiment.

Fixes #26883

Change-Id: Iadd513d0920ef12463006dd2a61e94370dd13f68
Reviewed-on: https://go-review.googlesource.com/128735
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: default avatarJoe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent da1da23f
...@@ -18,6 +18,7 @@ import ( ...@@ -18,6 +18,7 @@ import (
"cmd/go/internal/load" "cmd/go/internal/load"
"cmd/go/internal/str" "cmd/go/internal/str"
"cmd/internal/buildid" "cmd/internal/buildid"
"cmd/internal/objabi"
) )
// Build IDs // Build IDs
...@@ -206,6 +207,11 @@ func (b *Builder) toolID(name string) string { ...@@ -206,6 +207,11 @@ func (b *Builder) toolID(name string) string {
id = f[2] id = f[2]
} }
// For the compiler, add any experiments.
if name == "compile" {
id += " " + objabi.Expstring()
}
b.id.Lock() b.id.Lock()
b.toolIDCache[name] = id b.toolIDCache[name] = id
b.id.Unlock() b.id.Unlock()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment