prysm-pulse/crypto/bls/blst/init.go
Nishant Das 150640305a
Support Go Builds For Darwin Arm64 (#9600)
* add changes

* tidy

* stranded dep

* fixed commit

* use real commit

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-18 17:56:05 +00:00

20 lines
357 B
Go

// +build linux,amd64 linux,arm64 darwin,amd64 darwin,arm64 windows,amd64
// +build !blst_disabled
package blst
import (
"runtime"
blst "github.com/supranational/blst/bindings/go"
)
func init() {
// Reserve 1 core for general application work
maxProcs := runtime.GOMAXPROCS(0) - 1
if maxProcs <= 0 {
maxProcs = 1
}
blst.SetMaxProcs(maxProcs)
}