[LLVMdev] Can we use llvm-gcc to compile large project and generate IR?

Andrew Lenharth andrewl at lenharth.org
Mon Sep 14 07:17:15 PDT 2009


On Mon, Sep 14, 2009 at 3:32 AM, gauss <gausszhch at gmail.com> wrote:
> Hi, all.
> I have written a pass to do some inter-procedure work.  Then I tried to
> apply it to currently existing software.  But I failed to compile most of
> them using llvm-gcc.
>
> When I run    ./configure CC=llvm-gcc CFLAGS="-emit-llvm -c",    it reports
> "cannot run C compiled programs" and so on and then exit.
> ( I use CFLAGS="-emit-llvm -c" to produce LLVM bitcode so that my pass can
> run on it. )

Try dropping the -c and try again.  The makefiles for the project
should add -c, not the CFLAGS passed in.

Andrew




More information about the llvm-dev mailing list