diff options
author | Russ Cox <rsc@golang.org> | 2022-04-27 09:03:35 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2022-04-29 14:23:19 +0000 |
commit | e5407501cb5c43f9ba874fe5dad215435acbf5a2 (patch) | |
tree | 656e8f9892a61d65a75c05b933570de49c2b5a4a /src/cmd/compile/internal/ssa/print.go | |
parent | fe006d641079e8943833573bd1275ef51eb7fb60 (diff) | |
download | go-e5407501cb5c43f9ba874fe5dad215435acbf5a2.tar.gz go-e5407501cb5c43f9ba874fe5dad215435acbf5a2.zip |
[dev.boringcrypto] cmd: use notsha256 instead of md5, sha1, sha256
When we add GOEXPERIMENT=boringcrypto, the bootstrap process
will not converge if the compiler itself depends on the boringcrypto
cgo-based implementations of sha1 and sha256.
Using notsha256 avoids boringcrypto and makes bootstrap converge.
Removing md5 is not strictly necessary but it seemed worthwhile to
be consistent.
For #51940.
Change-Id: Iba649507e0964d1a49a1d16e463dd23c4e348f14
Reviewed-on: https://go-review.googlesource.com/c/go/+/402595
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/print.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/print.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/ssa/print.go b/src/cmd/compile/internal/ssa/print.go index 96cd2c7c90..aea9ce9e33 100644 --- a/src/cmd/compile/internal/ssa/print.go +++ b/src/cmd/compile/internal/ssa/print.go @@ -6,10 +6,11 @@ package ssa import ( "bytes" - "cmd/internal/src" - "crypto/sha256" "fmt" "io" + + "cmd/internal/notsha256" + "cmd/internal/src" ) func printFunc(f *Func) { @@ -17,7 +18,7 @@ func printFunc(f *Func) { } func hashFunc(f *Func) []byte { - h := sha256.New() + h := notsha256.New() p := stringFuncPrinter{w: h, printDead: true} fprintFunc(p, f) return h.Sum(nil) @@ -32,7 +33,7 @@ func (f *Func) String() string { // rewriteHash returns a hash of f suitable for detecting rewrite cycles. func (f *Func) rewriteHash() string { - h := sha256.New() + h := notsha256.New() p := stringFuncPrinter{w: h, printDead: false} fprintFunc(p, f) return fmt.Sprintf("%x", h.Sum(nil)) |