]> Cypherpunks repositories - gostls13.git/commitdiff
internal/goexperiment: add GOEXPERIMENT=boringcrypto
authorRuss Cox <rsc@golang.org>
Fri, 25 Mar 2022 17:22:57 +0000 (13:22 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 4 Apr 2022 21:06:49 +0000 (21:06 +0000)
Not hooked up to everything else yet.

Copy of CL 395880, for setting up GOEXPERIMENT=boringcrypto
builder ahead of merge.

For #51940.

Change-Id: If842761f77d07329d88748990b95f4b39c2f153a
Reviewed-on: https://go-review.googlesource.com/c/go/+/397895
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/internal/goexperiment/exp_boringcrypto_off.go [new file with mode: 0644]
src/internal/goexperiment/exp_boringcrypto_on.go [new file with mode: 0644]
src/internal/goexperiment/flags.go

diff --git a/src/internal/goexperiment/exp_boringcrypto_off.go b/src/internal/goexperiment/exp_boringcrypto_off.go
new file mode 100644 (file)
index 0000000..020c75b
--- /dev/null
@@ -0,0 +1,9 @@
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build !goexperiment.boringcrypto
+// +build !goexperiment.boringcrypto
+
+package goexperiment
+
+const BoringCrypto = false
+const BoringCryptoInt = 0
diff --git a/src/internal/goexperiment/exp_boringcrypto_on.go b/src/internal/goexperiment/exp_boringcrypto_on.go
new file mode 100644 (file)
index 0000000..1454329
--- /dev/null
@@ -0,0 +1,9 @@
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build goexperiment.boringcrypto
+// +build goexperiment.boringcrypto
+
+package goexperiment
+
+const BoringCrypto = true
+const BoringCryptoInt = 1
index 558b02607ee22ff94622f547cf6ae73b26a69648..20d9c2da5d96059be3a91abd91224fb9b90d80ea 100644 (file)
@@ -58,6 +58,7 @@ type Flags struct {
        FieldTrack        bool
        PreemptibleLoops  bool
        StaticLockRanking bool
+       BoringCrypto      bool
 
        // Unified enables the compiler's unified IR construction
        // experiment.