Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude assembly files in cgo packages in pure mode #3798

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hugelgupf
Copy link
Contributor

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".

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.

Signed-off-by: Chris Koch <chrisko@google.com>
@fmeum
Copy link
Collaborator

fmeum commented Dec 24, 2023

Could you explain how this relates to #3661, which I thought had fixed this issue? Sorry, I'm not very familiar with how the vanilla Go toolchain handles cgo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants