Link time optimisation error?

Hello,

I followed the instruction given at:
http://llvm.org/docs/LinkTimeOptimization.html#design, but got an
error.

Why it was that? Should I enable anything when configuring LLVM? I am
using LLVM v2.6.

$ llvm-gcc --emit-llvm -c a.c -o a.o
$ llvm-gcc -c main.c -o main.o
$ llvm-gcc a.o main.o -o main
a.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status

Cheers,
Zheng

Hi Zheng,

I followed the instruction given at:
http://llvm.org/docs/LinkTimeOptimization.html#design, but got an
error.

Why it was that? Should I enable anything when configuring LLVM? I am
using LLVM v2.6.

$ llvm-gcc --emit-llvm -c a.c -o a.o
$ llvm-gcc -c main.c -o main.o
$ llvm-gcc a.o main.o -o main
a.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status

this should help: http://llvm.org/docs/GoldPlugin.html

Ciao,

Duncan.