1
0
mirror of https://github.com/golang/go synced 2024-11-16 16:54:39 -07:00

[dev.boringcrypto] cmd/dist: default to use of boringcrypto

The dev.boringcrypto branch has historically forced use of boringcrypto
with no additional configuration flags. The previous CL undid that.
This CL redoes it, so that direct uses of dev.boringcrypto don't lapse
unexpectedly into not having boringcrypto enabled.

When dev.boringcrypto is merged into master, we will undo this change
as part of the merge, so that the only final difference between master
and dev.boringcrypto will be this CL.

For #51940.

Change-Id: I816593a0b30b4e71093a7da9451bae7807d7167e
Reviewed-on: https://go-review.googlesource.com/c/go/+/402597
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Russ Cox 2022-04-27 10:04:55 -04:00
parent f4c0f42f99
commit 509776be5d

View File

@ -199,6 +199,13 @@ func xinit() {
goexperiment = os.Getenv("GOEXPERIMENT") goexperiment = os.Getenv("GOEXPERIMENT")
// TODO(mdempsky): Validate known experiments? // TODO(mdempsky): Validate known experiments?
if !strings.Contains(goexperiment, "boringcrypto") {
if goexperiment != "" {
goexperiment += ","
}
goexperiment += "boringcrypto"
}
gogcflags = os.Getenv("BOOT_GO_GCFLAGS") gogcflags = os.Getenv("BOOT_GO_GCFLAGS")
goldflags = os.Getenv("BOOT_GO_LDFLAGS") goldflags = os.Getenv("BOOT_GO_LDFLAGS")