[LLVMdev] bc file only with llvm-gcc3?

Eli Friedman eli.friedman at gmail.com
Wed Sep 17 13:46:40 PDT 2008


On Wed, Sep 17, 2008 at 1:31 PM, Michael Reichenbach
<michael_reichenbach at freenet.de> wrote:
> question about:
> http://llvm.org/docs/FAQ.html#translatec++
> "With llvm-gcc3, this will generate program and program.bc."
>
> Is this llvm-gcc3 only out of date of is it really only llvm-gcc3?

Those instructions are out of date; the current version of llvm-gcc
doesn't generate bitcode files unless you explicitly ask it to
generate them.  The correct procedure with a current LLVM and llvm-gcc
is something like the following:

llvm-g++ a.cpp -c -emit-llvm
llvm-g++ b.cpp -c -emit-llvm
llvm-link a.bc b.bc -o program.bc
llc -march=c program.bc -o program.c
gcc program.c

-Eli



More information about the llvm-dev mailing list