[LLVMdev] How can I build Mysql and Apache using LLVM
annulen at yandex.ru
Fri Nov 2 01:46:41 PDT 2012
02.11.2012, 10:55, "David Blaikie" <dblaikie at gmail.com>:
> On Thu, Nov 1, 2012 at 10:04 PM, Zhoujinguo <zhoujinguo1988 at yahoo.cn> wrote:
>> I am interested in building some large projects to get single .bc files. Is there an easy way to do this? Or do I have to go through and understand the whole makefile script?
> This is what LLVM's "LTO" (Link Time Optimization) does, basically. This is triggered by building with -O4 and you'd need to use an LTO-aware linker (like gold) to handle the link step. I'm not sure how you'd actually dump out bitcode from the linker, rather than a final binary - but that's more-or-less where you'd get involved.
Instead of using linker, you can call all .o files and process them - when building with -O4 they contain bitcode.
More information about the llvm-dev