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

Holger Schurig hs4233 at mail.mn-solutions.de
Fri Aug 24 13:45:07 PDT 2007


The web page "LLVM Link Time Optimization: Design and Implementation"
contains errors.

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


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 :-/



More information about the llvm-dev mailing list