m1cpu: add CGO build tags and document in README
diff --git a/README.md b/README.md index b01bf86..4cdfb70 100644 --- a/README.md +++ b/README.md
@@ -27,6 +27,11 @@ } ``` +# CGO + +This package requires the use of CGO. Extracting the CPU properties is done via +Apple's IOKit framework, which is accessible only through system C libraries. + # License Open source under the [MPL](LICENSE)
diff --git a/cpu.go b/cpu.go index ed29b3e..ebd0b9d 100644 --- a/cpu.go +++ b/cpu.go
@@ -1,4 +1,4 @@ -//go:build darwin && arm64 +//go:build darwin && arm64 && cgo package m1cpu
diff --git a/cpu_test.go b/cpu_test.go index 769cade..1edc836 100644 --- a/cpu_test.go +++ b/cpu_test.go
@@ -1,4 +1,4 @@ -//go:build darwin && arm64 +//go:build darwin && arm64 && cgo package m1cpu
diff --git a/incompatible.go b/incompatible.go index 28412b8..76c1d8b 100644 --- a/incompatible.go +++ b/incompatible.go
@@ -1,4 +1,4 @@ -//go:build !darwin || !arm64 +//go:build !darwin || !arm64 || !cgo package m1cpu