[LLVMdev] Documentation error in http://llvm.org/docs/LinkTimeOptimization.html

Tanya M. Lattner tonic at nondot.org
Fri Aug 24 15:45:01 PDT 2007


> In the gray block below "Example of link time optimization" there are
> some source files and then a list of commands to execute:
>
> $ llvm-gcc4 --emit-llvm -c a.c -o a.o
> $ llvm-gcc4 -c main.c -o main.o
> $ llvm-gcc4 a.o main.o -o main
>
> 1) in current LLVM (e.g. llvm itself, cfe, llvm-gcc-4.0) no binary with
> the name "llvm-gcc4" get's created

When you build llvm-gcc you can give it any program prefix/postfix name 
you wish, so its possible to name it llvm-gcc-4.0. However, the main 
reason behind this was to distinguish from llvm-gcc3 which we supported 
along with llvm-gcc4. The documentation could be updated to say llvm-gcc 
but unless you specify the prefix "llvm-" during configure, it wont be 
named that either :)

Devang already answered the second part.

-Tanya

>
>
> Now, let's assume that the gcc compiler from llvm-gcc-4.0 has been meant
> and let us substitute therefore "llvm-gcc4" with "llvm-gcc". This gives
> us:
>
> $ 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
>
> Okay, that did not really work :-/
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list