<div dir="ltr">Thank you for you nice answer. But I'am sorry, I find the question I was asked is not what I really want. my situation is that I want to write a LLVM pass to check a large progress. what is the simplest way for me to make the progress become checkable?</div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-25 1:54 GMT+08:00 Pete Cooper <span dir="ltr"><<a href="mailto:peter_cooper@apple.com" target="_blank">peter_cooper@apple.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Jun 24, 2015, at 10:19 AM, Eli Bendersky <<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>> wrote:</div><br><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 24, 2015 at 7:05 AM, Q Z <span dir="ltr"><<a href="mailto:zhaoqian301@gmail.com" target="_blank">zhaoqian301@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello,I want to compile a large project(for example,Apache httpd) to one .bc file. How can I do this? Can you give me some examples?<div><br></div></div></blockquote><div><br></div><div>In general, if the codebase of a certain project is compilable by Clang/LLVM, this should be possible, but the devil is in the details (for example - how is the standard library going to get compiled into that .bc file?)</div></div></div></div></div></blockquote></span>If you only care about the project itself and not things like the standard library, then LTO is possible too.  Depends on the linker you are using, but Apple’s ld and I believe the gold linker both have -save-temps options which save the bit codes before/after optimization but certainly after linking.</div><div><br></div><div>Cheers,</div><div>Pete<br><blockquote type="cite"><div><span class=""><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>I suggest you take a look at the "NaCl ports" project (<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__code.google.com_p_naclports_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=RfjvEJWweAkWHLneLw1ksvf1RoobZbEIUUVtXtJgYv4&s=RvO9OeVGsfCkE0U5HJQV_pwo1s2U1qoZg2Wx-gK19cs&e=" target="_blank">https://code.google.com/p/naclports/</a>). It has ready-made makefiles to compile a bunch of well known open source projects using the PNaCl toolchain, which is based on LLVM. Each file is compiled to IR and the LLVM linker is used to link them all together. This is a full solution, handling the standard libraries, and so on. </div><div><br></div><div><br></div><div>Eli</div><div><br></div></div></div></div></span>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></div><br></div></blockquote></div><br></div>