[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>
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index bbaf595..519f33a 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -199,6 +199,13 @@
 	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")