2

How I can generate a working executable with the tools provided with Llvm/Clang ( version 3.3 (trunk 168461) ) ?

I have compiled an object with clang++ -c [...] and i would like to try to link this object to 1 specific library and see if this can generate a working executable.

I have noticed that from the 3.1 release llvm-ld it's been removed and llvm-link doesn't look like it has inherited all the options from llvm-ld, although it's marked as the alternative to llvm-ld on the official docs, so i just don't get how I'm supposed to link this object.

I don't want to use ld from the GNU/GCC suite, only tools from llvm.

To summarize this are the tools that i have got from the llvm build from the svn

bugpoint      clang-check   llvm-bcanalyzer  llvm-extract   llvm-objdump  llvm-stress      scan-build
c++-analyzer  clang-tblgen  llvm-config      llvm-link      llvm-prof     llvm-symbolizer  scan-view
ccc-analyzer  llc           llvm-cov         llvm-lit       llvm-ranlib   llvm-tblgen      scanview.css
clang         lli           llvm-diff        llvm-mc        llvm-readobj  macho-dump       ScanView.py
clang++       llvm-ar       llvm-dis         llvm-mcmarkup  llvm-rtdyld   opt              sorttable.js
clang-3.3     llvm-as       llvm-dwarfdump   llvm-nm        llvm-size     Reporter.py      startfile.py

Thanks.

1
  • I really need an explanation on how to avoid the use of the GNU ld and using only the llvm tools ... Commented Nov 23, 2012 at 14:41

2 Answers 2

5

There are no llvm linker at this time (yet). And no, llvm-link is not a replacement for LLVM ld. So, you'd need to use ar / ranlib / ld from your binutils for now.

Sign up to request clarification or add additional context in comments.

Comments

1

If you want to link LLVM bitcode files, you should have a look at the LLVM Gold Plugin : http://llvm.org/docs/GoldPlugin.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.