From 4fd73e5d4ca8c87efa127ee7a3290b1d0fdae313 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Wed, 4 Sep 2024 18:30:35 +0700 Subject: cmd: do not use notsha256 CL 402595 used notsha256 to prevent the compiler from depending on cgo-based implementations of sha1 and sha256. However, since CL 454836, cmd is built with CGO_ENABLED=0, which will disable boringcrypto. Thus all usages of notsha256 is not necessary anymore. Updates #51940 Updates #64751 Change-Id: I503090f7a2efb5723e8a79523b143dc7cdb4edd0 Reviewed-on: https://go-review.googlesource.com/c/go/+/610596 Auto-Submit: Cuong Manh Le LUCI-TryBot-Result: Go LUCI Reviewed-by: Keith Randall Reviewed-by: Dmitri Shuralyov Reviewed-by: Keith Randall --- src/cmd/compile/internal/noder/reader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cmd/compile/internal/noder') diff --git a/src/cmd/compile/internal/noder/reader.go b/src/cmd/compile/internal/noder/reader.go index 98ae60d51e..1dae4da167 100644 --- a/src/cmd/compile/internal/noder/reader.go +++ b/src/cmd/compile/internal/noder/reader.go @@ -23,7 +23,7 @@ import ( "cmd/compile/internal/staticinit" "cmd/compile/internal/typecheck" "cmd/compile/internal/types" - "cmd/internal/notsha256" + "cmd/internal/hash" "cmd/internal/obj" "cmd/internal/objabi" "cmd/internal/src" @@ -940,7 +940,7 @@ func shapify(targ *types.Type, basic bool) *types.Type { uls := under.LinkString() if base.Debug.MaxShapeLen != 0 && len(uls) > base.Debug.MaxShapeLen { - h := notsha256.Sum256([]byte(uls)) + h := hash.Sum32([]byte(uls)) uls = hex.EncodeToString(h[:]) } -- cgit v1.3-5-g9baa