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

Add support to dynamic LLVM libraries #406

Open
Daniel-Boll opened this issue Mar 30, 2023 · 4 comments
Open

Add support to dynamic LLVM libraries #406

Daniel-Boll opened this issue Mar 30, 2023 · 4 comments

Comments

@Daniel-Boll
Copy link

Is your feature request related to a problem? Please describe.

Yes, the current version of the LLVM crate does not support dynamic LLVM libraries, which limits its usability in certain scenarios. This can be frustrating for users who need to work with dynamically loaded libraries.

Describe the solution you'd like

The solution would be to add support for dynamic LLVM libraries in the LLVM crate, as has been done in the llvm-sys crate with this MR: https://gitlab.com/taricorp/llvm-sys.rs/-/merge_requests/31. This would allow users to work with dynamically loaded libraries and improve the crate's overall usability.

Describe possible drawbacks to your solution

One possible drawback is that adding support for dynamic LLVM libraries could increase the size of the crate and potentially impact its performance. Additionally, it could introduce compatibility issues with certain systems or configurations.

Describe alternatives you've considered

One alternative solution could be for users to manually modify the LLVM crate to add support for dynamic libraries, but this would require significant effort and knowledge of the crate's internals. Another alternative could be to use a different crate or library that already supports dynamic LLVM libraries.

Additional context

None.

@yorickpeterse
Copy link
Contributor

Per https://gitlab.com/taricorp/llvm-sys.rs/-/issues/48, new versions of llvm-sys are released that include support for dynamic linking. Adding support for this should be a matter of adding the necessary features to propagate. Until a new release of Inkwell is available, you can add the following to your Cargo.toml:

# If using LLVM 15:
llvm-sys-150 = { package = "llvm-sys", version = "150.1.0", features = ["prefer-static"] }

@Daniel-Boll
Copy link
Author

Oh, I see, thank you for your reply @yorickpeterse.

@yorickpeterse
Copy link
Contributor

@Daniel-Boll I think this issue should stay open, as Inkwell itself doesn't yet take care of passing down the necessary features 😃

@Daniel-Boll Daniel-Boll reopened this May 23, 2023
@Pat-Lafon
Copy link
Contributor

I think this has been fixed in #428?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants