<br><br><div class="gmail_quote">2010/10/29 Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> clang -x c  foo.c -emit-llvm-bc -o /tmp/llvm_JnS1o8/foo.bc<br>
> (.text+0x20): undefined reference to `main'<br>
> collect2: ld returned 1 exit status<br>
> clang: error: linker (via gcc) command failed with exit code 1 (use -v to<br>
> see invocation)<br>
<br>
</div>Without a -c I think clang is trying to link the llvm IL file. For<br>
that to work you would need a linker that understands LLVM IL. Both<br>
the apple linker and gold support plugins for doing it.<br></blockquote><div><br></div><div>Then it looks like a bug in llvmc driver -- -c is not passed to clang.</div><div><br></div><div>David</div><div><br></div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
> David<br>
<br>
Cheers,<br>
<font color="#888888">Rafael<br>
</font></blockquote></div><br>