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

Integrate libffi in the build system #19

Closed
alexrp opened this issue Jun 20, 2024 · 2 comments
Closed

Integrate libffi in the build system #19

alexrp opened this issue Jun 20, 2024 · 2 comments
Labels
area: build Issues related to the build system.
Milestone

Comments

@alexrp
Copy link
Member

alexrp commented Jun 20, 2024

This will be needed for the interpreter to call external functions.

I don't want to take a dependency on the system libffi since that majorly complicates our (currently) simple build process. That said, it should still be possible to use the system libffi for distro maintainers (ziglang/zig#18778). Also, as with Aro, it should be possible to disable libffi support since I expect very few Graf library users will care about the interpreter.

This will likely involve forking libffi, adding a build.zig, and then adding that fork as a lazy build.zig.zon dependency (but note #16).

@alexrp alexrp added area: build Issues related to the build system. state: approved Enhancements and tasks that have been approved. type: feature labels Jun 20, 2024
@alexrp alexrp added this to the v1.0 milestone Jun 20, 2024
@alexrp alexrp self-assigned this Jun 20, 2024
@alexrp
Copy link
Member Author

alexrp commented Jun 20, 2024

Started the work here: https://github.com/alexrp/libffi/commits/master

The script itself mostly works, but I ran into a handful of issues:

Also, I raised the question of upstreaming the build script: libffi/libffi#842

@alexrp
Copy link
Member Author

alexrp commented Jun 21, 2024

For now, we'll just have to maintain some logic to disable libffi support on known-broken targets.

@alexrp alexrp closed this as completed in 5a378f1 Jun 21, 2024
@alexrp alexrp removed the state: approved Enhancements and tasks that have been approved. label Jun 21, 2024
@alexrp alexrp removed their assignment Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Issues related to the build system.
Projects
None yet
Development

No branches or pull requests

1 participant