Skip to content

Commit

Permalink
TargetSpecific: update purego tag guidance
Browse files Browse the repository at this point in the history
Updates golang/go#58636

Change-Id: I28cbe38d750ae10f3f78af909de33424ff2a6241
Reviewed-on: https://go-review.googlesource.com/c/wiki/+/561955
Auto-Submit: Filippo Valsorda <[email protected]>
Commit-Queue: Filippo Valsorda <[email protected]>
Reviewed-by: Filippo Valsorda <[email protected]>
  • Loading branch information
FiloSottile authored and gopherbot committed Feb 6, 2024
1 parent 52c302b commit c60b321
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions TargetSpecific.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func sumGeneric(out *[16]byte, m []byte, key *[32]byte) {
poly1305_amd64.go

```go
// +build gc,!purego
//go:build !purego

package poly1305

Expand All @@ -49,7 +49,7 @@ func sum(out *[16]byte, m []byte, key *[32]byte)
poly1305_amd64.s

```
// +build gc,!purego
//go:build !purego

// func sum(out *[16]byte, m []byte, key *[32]byte)
TEXT ·sum(SB), $0-128
Expand All @@ -59,7 +59,7 @@ TEXT ·sum(SB), $0-128
poly1305_noasm.go

```go
// +build !amd64 !gc purego
//go:build !amd64 || purego

package poly1305

Expand Down Expand Up @@ -91,5 +91,3 @@ func TestSumCompare(t *testing.T) {
```

For more complete examples see the [x/crypto/poly1305](https://github.com/golang/crypto/tree/master/poly1305) and [x/crypto/salsa20/salsa](https://github.com/golang/crypto/tree/master/salsa20/salsa) packages.

Note that packages in the standard library (as opposed to modules like golang.org/x/crypto) do not use the `gc` and `purego` build tags.

0 comments on commit c60b321

Please sign in to comment.