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

Fix the musl build #113

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Fix the musl build #113

merged 1 commit into from
Oct 23, 2023

Conversation

bhansconnect
Copy link
Collaborator

It was failing due to GC collecting functions we want to expose to the linker.

@Anton-4, this should fix the musl build while still enable a small binary with garbage collection. I guess in a static build, garbage collection is more aggressive because it assumes that functions can't be exposed to dynamic libraries. So we have to explicitly protect them.

When we eventually have effect interpreters, this should all go away and become a simple switch statement that uses the functions. This will stop them from getting GCed in general. (hmm, may still need it for roc_alloc and friends)

It was failing due to GC collecting functions we want to expose to the linker.
Copy link
Collaborator

@Anton-4 Anton-4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bhansconnect ❤️

If we were to add a new roc_fx function and we forgot to add it to this list would we get an error at build time?

@Anton-4 Anton-4 merged commit 3117fd3 into main Oct 23, 2023
1 check passed
@Anton-4 Anton-4 deleted the fix-musl branch October 23, 2023 10:20
@bhansconnect
Copy link
Collaborator Author

If we were to add a new roc_fx function and we forgot to add it to this list would we get an error at build time?

Sadly no. The musl build will just silently not include the symbol....it is quite inconvenient.

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.

2 participants