]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.boringcrypto] cmd/dist: default to use of boringcrypto
authorRuss Cox <rsc@golang.org>
Wed, 27 Apr 2022 14:04:55 +0000 (10:04 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 29 Apr 2022 14:23:25 +0000 (14:23 +0000)
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>

src/cmd/dist/build.go

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