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

LLVM 16 #55

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

LLVM 16 #55

wants to merge 6 commits into from

Conversation

Kronos3
Copy link

@Kronos3 Kronos3 commented Mar 8, 2024

I added support for LLVM 16. In an effort to make future porting a little easier, I made use of the llvm/IR/Attributes.inc where attributes are defined. The attribute declaration macros are overridden to have the preprocessor register the attributes for us.

The TS declaration are also passed through the preprocessor so that they are also updated from version to version.

I also added an override to <assert.h> that throws a NodeJS error by default so that its easier to debug LLVM assertion failures in the JS context

@ApsarasX
Copy link
Owner

ApsarasX commented Mar 8, 2024

Thanks for your contribution! I will review this PR within 3days.

@Lotes
Copy link

Lotes commented Apr 10, 2024

@Kronos3 Really nice! Do you plan to do the same for higher versions of LLVM (currently 18 is released)? :)

@ApsarasX I noticed that you are over the 3 days already. What are the challenges with the review? Do you find the time? This is a very interesting contribution for me.

@Kronos3
Copy link
Author

Kronos3 commented Apr 12, 2024

@Lotes The main work to port to LLVM 18 I believe would be to remove the non-opaque pointer API entirely so I don't envision it to be to difficult. If you need it I'd recommend just installing LLVM 18 and working through the compilation errors. This port took about 3 hours for reference.

I ended up not using this library since it was missing too much out of the full LLVM API which ended up becoming cumbersome while developing my frontend.

@pluralia
Copy link

@Kronos3, thanks for your PR on upgrading to LLVM 16. We are really interested in this and look forward to the review and merge by @ApsarasX.

I ended up not using this library since it was missing too much out of the full LLVM API which ended up becoming cumbersome while developing my frontend.

Could you tell how you use LLVM, what parts of the LLVM API you are missing, and what workaround you found?

@pluralia
Copy link

@ApsarasX, thanks for the library, it's a good connection of the worlds of TS and LLVM 👍
What are your plans for llvm-bindings? My team uses it extensively and we are considering helping / taking over maintenance. Could we discuss it?

Here is our fork that adds DIBuilder::createArrayType and DIBuilder::createStructType.

@leonelsanchesdasilva
Copy link

@pluralia @Kronos3 @Lotes @ApsarasX I have interest in collaborating with this project as well. LLVM is currently at version 19 already, and I'm missing some of its new features.

@spoenemann
Copy link

FYI we have added some features to a fork of this repo here: https://github.com/TypeFox/llvm-bindings

We could contribute that back if there's interest. This is not directly related to the version upgrade, though.

@EdamAme-x
Copy link

I too would like to have bindings for the new version.
Great project.

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.

7 participants