…
|
||
---|---|---|
.. | ||
.golangci.yml | ||
amd64variant.go | ||
amd64variant.s | ||
amd64variant_darwin.go | ||
amd64variant_darwin.s | ||
amd64variant_nodarwin.go | ||
amd64variant_unsupported.go | ||
docker-bake.hcl | ||
Dockerfile | ||
LICENSE | ||
README.md |
go-archvariant
Go package for determining the maximum compatibility version of the current system. The main use case is to use this value in container platform definitions.
On x86-64 platforms this package returns the maximum current microarchitecture level as defined in https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels . This value can be used to configure compiler in LLVM since 12.0 and GCC since 11.0. Go1.18+ uses GOAMD64
environemnt to configure Go compiler with this value.
Scope
The goal of this repository is to only provide the variant with minimal external dependencies. If you need more specific CPU features detection you should look at golang.org/x/sys/cpu
or github.com/klauspost/cpuid
instead.
Credits
The checks in this repository are based on the checks Go runtime does on startup.