[LLVMdev] strict aliasing and LLVM
Rafael Espíndola
rafael.espindola at gmail.com
Fri Oct 29 19:46:56 PDT 2010
> 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.
> David
Cheers,
Rafael
More information about the llvm-dev
mailing list