WIP: Add support for the llvm: use scheme #3924
Open
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.
In the ponysync meeting on 2021-11-02 and on Zulip we discussed having a use scheme which would allow inclusion and linking of pre-generated llvm-ir (.ll) files by the ponyc compiler.
@jemc walked me through compiler and the process needed to make these changes and this is the result thus far.
Here is how it works:
The use scheme makes ponyc look for the associated file.ll, so in the above example:
addints.ll
To generate the
addints.ll
file, we take the following C file:… and compile like so:
Pony compilation and execution:
TODO:
[] Initial Code Review
[] Write Tests
[] Ensure that .ll files from other packages resolve to the correct path
[] Write an example
[] Tutorial Updates
[] Identify if the above warning is NixOS specific and understand what it means.
[] TWIP
Please let me know if I've missed anything.
Thanks,
Red