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

Simple Example To Link Executable Using LLD #144

Open
Pebaz opened this issue Dec 25, 2019 · 2 comments
Open

Simple Example To Link Executable Using LLD #144

Pebaz opened this issue Dec 25, 2019 · 2 comments
Labels

Comments

@Pebaz
Copy link

Pebaz commented Dec 25, 2019

How do I link a simple hello-world LLVM module into an executable using LLD?
Per this documentation for LLVM, this is possible from code but I am not sure it is implemented in Inkwell.

@TheDan64
Copy link
Owner

Sorry that I missed this question. LLD is a linker separate from LLVM so your question is a bit outside the scope of inkwell.

But you'd want to build some sort of output object file which you can then pass to LLD. I'm not sure if Inkwell has great support for building object files yet, but it might be possible.

@tomaka
Copy link

tomaka commented Mar 15, 2021

I was trying to figure out how to write an object file and I found this issue.
In case someone else is in the same situation: the TargetMachine::write_to_file or TargetMachine::write_to_memory_buffer functions are likely what you're looking for.

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

No branches or pull requests

3 participants