Exclude assembly files in cgo packages in pure mode
This matches go build behavior: assembly files in packages with cgo are processed through cgo first. This means that noncgo compilation excludes assembly files in packages with cgo.
Note https://github.com/golang/go/blob/2184a394777ccc9ce9625932b2ad773e6e626be0/src/cmd/go/internal/work/exec.go#L758 in Go build source
Example package: https://github.com/cloudflare/circl/tree/main/dh/x25519 curve_amd64.(h|s)
Does not compile correctly before this patch when pure = "on".
Could you explain how this relates to https://github.com/bazelbuild/rules_go/pull/3661, which I thought had fixed this issue? Sorry, I'm not very familiar with how the vanilla Go toolchain handles cgo.
Hi @hugelgupf, did you have a chance to check @fmeum's comment?
If this by any chance fixes depending on cloudflare/circl with pure = on this will be greatly appreciated.
Thanks!