Sorry, I post this message on this mailing list since I couldn't find the one for common users. As a LLVM newcomer, I don't know how to do the link time optimization correctly after building the gcc frontend and LLVM itself. I followed the example in <a href="http://llvm.org/docs/LinkTimeOptimization.html">http://llvm.org/docs/LinkTimeOptimization.html</a> but at the final step I got the following error:<br>
<br>[XXXX@XXX example]$ llvm-gcc a.o main.o -o main<br>ld warning: in a.o, file is not of required architecture<br>Undefined symbols:<br>  "_foo1", referenced from:<br>      _main in main.o<br>ld: symbol(s) not found<br>
collect2: ld returned 1 exit status<br><br>It looks like llvm-gcc called the non-llvm linker that didn't recognize the a.o in bitcode. I'm using OS X Leapard, llvm-2.7, and llvm-gcc-4.2-2.7. Thanks.<br><br>Xiaoming <br>