[llvm-dev] LLVM Linker
Nemanja Ivanovic via llvm-dev
llvm-dev at lists.llvm.org
Tue Oct 10 01:59:42 PDT 2017
I am not sure why you want llc to link binaries. It is not designed for
that. This is just a tool for developers to get access to the back end
passes including codegen (and provide IR as input). What you are after is
well outside of the design goal of llc and I don't believe the community
will accept any patches you propose to let llc invoke a toolchain to build
binaries. If I am wrong in this assessment, I hope someone more experienced
will correct me.
That being said, I don't see any reason you might want this (hence my
expectation of the community's reluctance to allow this). If you want to
build executables, you'll have to invoke the toolchain yourself - or use
clang.
You can see what clang will do on your system with an invocation such as
this:
$ clang -O2 a.ll -v
The file a.ll is just an IR file that has a main. That will link the binary
and show you the steps it took to do so on your system.
On Tue, Oct 10, 2017 at 8:54 AM, Alexander Benikowski via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi,
> What is your goal? Executable? Library? used it only once some weeks ago
> but iirc for example:
>
> lld /dll Foo.obj Bar.obj
>
> On windows lld will complain it is just a generic driver and give you a
> set of tools to run instead (like lld-link)
>
> 2017-10-10 5:54 GMT+02:00 hameeza ahmed via llvm-dev <
> llvm-dev at lists.llvm.org>:
>
>> this option does not work with llc. i want to generate the link object
>> file from llc. how to do this?
>>
>> On Tue, Oct 10, 2017 at 3:39 AM, Anthony Eden <aeden at csail.mit.edu>
>> wrote:
>>
>>> -fuse-ld=lld
>>>
>>> On Mon, Oct 9, 2017 at 4:42 PM, hameeza ahmed via llvm-dev <
>>> llvm-dev at lists.llvm.org> wrote:
>>>
>>>> Hello,
>>>>
>>>> I want to pass my object files through linker. How to achieve this in
>>>> llvm?
>>>>
>>>>
>>>> Please help
>>>>
>>>> Thank You
>>>>
>>>> _______________________________________________
>>>> LLVM Developers mailing list
>>>> llvm-dev at lists.llvm.org
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171010/db3a496b/attachment.html>
More information about the llvm-dev
mailing list