Repository navigation
purego: use runtime/cgo instead of fakecgo on Go 1.28 and later - #574
Merged
Merged
Conversation
Go 1.28 has a pure assembly and Go implementation of runtime/cgo that can build with CGO_ENABLED=0 (GOEXPERIMENT=noruntimecgopurego can be set to disable it). Use that instead of fakecgo. Once purego supports a minimum version of Go 1.28 in its go.mod file we should be able to delete fakecgo entirely. For ebitengine#565
TotallyGamerJet
left a comment
Collaborator
There was a problem hiding this comment.
If someone disables the GOEXPERIMENT, runtimecgopurego shouldn't we still fall back to fakecgo?
Contributor
Author
|
I added build tags to fall back to fakecgo when the goexperiment is disabled on go1.28 but always enabled in go1.29, with the expectation that we well remove the experiment in go1.29. But the experiment is meant to be an emergency fallback in case bugs are encountered rather than a supported configuration |
Contributor
Author
|
Thanks! How can I run the checks? |
Collaborator
|
I approved them for you |
Contributor
Author
|
Thanks!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Go 1.28 has a pure assembly and Go implementation of runtime/cgo that can build with CGO_ENABLED=0 (GOEXPERIMENT=noruntimecgopurego can be set to disable it). Use that instead of fakecgo.
Once purego supports a minimum version of Go 1.28 in its go.mod file we should be able to delete fakecgo entirely.
For #565
What issue is this addressing?
Closes #565
What type of issue is this addressing?
feature
What this PR does | solves
This PR changes purego to use the pure assembly and Go runtime/cgo implementation that will be available on Go 1.28+ instead of using fakecgo.