gpuinfo: Make CGO optional on darwin

Signed-off-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
This commit is contained in:
Piotr Stankiewicz 2025-07-24 14:15:48 +02:00 committed by Piotr
parent 7777c22890
commit ecfa5e7e68
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,5 @@
//go:build darwin && cgo
package gpuinfo
/*

View File

@ -0,0 +1,10 @@
//go:build darwin && !cgo
package gpuinfo
import "errors"
// getVRAMSize returns total system GPU memory in bytes
func getVRAMSize(_ string) (uint64, error) {
return 0, errors.New("unimplemented without cgo")
}