问题描述
我如何使用Llvm / Clang提供的工具(版本3.3(trunk 168461))生成可执行文件?
我编译了一个 clang ++ -c [...]
,我想尝试将此对象链接到一个特定的库,看看是否可以生成一个可执行的工作。
llvm-ld
它已被删除和 llvm链接
看起来不像它继承了所有的选项从 llvm-ld
,虽然它被标记为llvm-ld在官方文档的替代,所以我只是 我不想使用 ld
GNU / GCC套件,只有来自llvm的工具。
总结这是我从svn中创建的工具llvm
< pre>
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。
目前还没有llvm链接器。没有,llvm-link不是LLVM ld的替代品。所以,你现在需要使用你的binutils的ar / ranlib / ld。
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.
解决方案 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.
这篇关于如何将对象链接到LLVM> = 3.1的库? (无GNU ld)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!