[LLVMdev] strict aliasing and LLVM

Xinliang David Li xinliangli at gmail.com
Fri Oct 29 22:21:21 PDT 2010


2010/10/29 Rafael EspĂ­ndola <rafael.espindola at gmail.com>

> > clang -x c  foo.c -emit-llvm-bc -o /tmp/llvm_JnS1o8/foo.bc
> > (.text+0x20): undefined reference to `main'
> > collect2: ld returned 1 exit status
> > clang: error: linker (via gcc) command failed with exit code 1 (use -v to
> > see invocation)
>
> Without a -c I think clang is trying to link the llvm IL file. For
> that to work you would need a linker that understands LLVM IL. Both
> the apple linker and gold support plugins for doing it.
>

Then it looks like a bug in llvmc driver -- -c is not passed to clang.

David



>
> > David
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101029/58f1a133/attachment.html>


More information about the llvm-dev mailing list