}
platform := goos + "/" + goarch
+ if _, ok := osArchSupportsCgo[platform]; !ok {
+ return false // platform unrecognized
+ }
switch buildmode {
case "archive":
}
return false
}
+
+// CgoSupported reports whether goos/goarch supports cgo.\n")
+func CgoSupported(goos, goarch string) bool {
+ return osArchSupportsCgo[goos+"/"+goarch]
+}