<br><br><div class="gmail_quote">On Thu, Nov 1, 2012 at 10:04 PM, Zhoujinguo <span dir="ltr"><<a href="mailto:zhoujinguo1988@yahoo.cn" target="_blank">zhoujinguo1988@yahoo.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit"><div>Hi,</div><div><br></div><div><span style="line-height:23px;font-size:12px;font-family:verdana,arial,helvetica,sans-serif">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?</span></div>
</td></tr></tbody></table></blockquote><div><br></div><div>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.<br>
<br>I realize this is a bit vague (as I'm by no means an expert on the matter) but thought it might be at least a pointer to some ideas/approach.</div><div><br></div><div>- David </div></div>