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

Get building on LLVM 18.1 (...But not working) #278

Closed
wants to merge 2 commits into from

Conversation

ausbin
Copy link
Contributor

@ausbin ausbin commented Jun 3, 2024

Rough work on upgrading to LLVM 18.1.6 (#224). This builds, but the tests definitely do not pass (some segfault, actually). So this should not be merged into main in its current state, but I'm putting this up if it saves someone some time.

I built this with the following in pyqir/:

$ pip install -v --config-settings=build-args='-F qirlib/llvm18-1 -F pyqir/llvm18-1' .[test]

(I did not use the PowerShell build script.)

Remaining Problems

If y'all are interested, I can continue working on this and get the tests to pass.

One thing that seems particularly nasty at the moment is how to handle Builder.call(). I can think of two options:

  1. Modify the signature of Builder.call() to also take a Type (looks like that already exists in types.rs). This is backwards incompatible
  2. Modify Value to also hold an LLVMType. (This may quickly become burdensome to support in future usecases, but it would probably be a simpler user-facing API)

What do y'all think? And are there plans to upgrade LLVM at all?

The tests do not pass. Builder.call() is particularly broken.
@ausbin ausbin changed the title Get building on LLVM 18.1 Get building on LLVM 18.1 (...But not working) Jun 3, 2024
@ausbin
Copy link
Contributor Author

ausbin commented Jun 4, 2024

Just stumbled upon this:

unsafe fn is_opaque_pointer_to(ty: LLVMTypeRef, name: &CStr) -> bool {
. That will need to get fixed too

@ausbin
Copy link
Contributor Author

ausbin commented Jun 11, 2024

I'm getting the vibe that it is not helpful for me to continue working on this, closing

@ausbin ausbin closed this Jun 11, 2024
@ausbin ausbin deleted the wip/llvm18.1 branch June 11, 2024 16:57
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.

None yet

1 participant