[LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows

Michael Ness mike at liquido2.com
Fri Dec 11 19:31:29 PST 2009



--------------------------------------------------
From: "Óscar Fuentes" <ofv at wanadoo.es>
Sent: Friday, December 11, 2009 4:32 PM
To: <llvmdev at cs.uiuc.edu>
Subject: Re: [LLVMdev] Rebuilding LLVM libraries with LLVM-GCC on Windows

>
> You are working with an assembler file. Why?

Here is the build process I'm using for my project:  I have a program 
written in LLVM assembly that is converted to bit code using llvm-as.  I 
have anther file written in C that is compiled to bit code using 
llvm-gcc --emit-llvm.  These two bit code files are then linked with 
llvm-link and the resulting bit code is assembled with llc to yield the 
assembly file I'm using.

> You don't need to enumerate the base libraries. Something like
>
> llvm-config --ldflags --libs x86
>
> should suffice. In the next message, please show the output of that
> command. Maybe the `--ldflags' is adding stuff to the command line that
> causes the problem. Try removing it.

$ llvm-config --ldflags --libs x86
-L/home/Michael/llvm-2.6/lib  -limagehlp -lpsapi -lLLVMX86AsmParser -lLLVMX86AsmPrinter 
 -lLLVMX86CodeGen
 -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMTransformUtils 
 -lLLVMipa
 -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMX86Info -lLLVMSupport 
 -lLLVMSystem

> Was the assembler file generated by the same g++ you are using for
> linking it and, previously, for building LLVM?

No, the assembler file was generated by llvm-as.  I did use the same 
llvm-g++ to compile the C source file to bit code though.

> Have you access to other toolset for building your project (VC++, g++ on
> Linux, etc.)? Have you tried using LLVM libraries created with
> configure&make, as Anton suggested?

I do have access to VC++ and Linux g++ and will attempt to build using these 
tools.  I have tried configure&make to build LLVM, but the build process 
fails.  This is why I moved to CMake.

--Mike 




More information about the llvm-dev mailing list