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

go: gather and link transitive prebuilt object files for cgo mode #17971

Merged
merged 1 commit into from Jan 12, 2023

Conversation

tdyas
Copy link
Contributor

@tdyas tdyas commented Jan 11, 2023

The go tool will gather and link transitive prebuilt object files for a package (.syso files) into the cgo output object file. This is necessary to avoid linking errors due to missing libraries in some cases with packages using cgo. (I actually encountered just such a linker error when developing #17914.)

See go tool source: https://github.com/golang/go/blob/6ad27161f8d1b9c5e03fb3415977e1d3c3b11323/src/cmd/go/internal/work/exec.go#L3291-L3311

This is part of fixing #17950 and was extracted from #17914.

@tdyas tdyas added backend: Go Go backend-related issues category:bugfix Bug fixes for released features labels Jan 11, 2023
@tdyas tdyas requested review from kaos, benjyw and stuhood January 11, 2023 21:05
@tdyas tdyas merged commit 361be6d into pantsbuild:main Jan 12, 2023
@tdyas tdyas deleted the golang_cgo_transitive_syso_files branch January 12, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Go Go backend-related issues category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants