[LLVMdev] LLVM on MinGW

sam lee skynare at gmail.com
Wed Nov 28 11:49:31 PST 2007

Hey Alain,

This is what I did to try hello world on llvm:

Haven't looked at llvm after that.. Probably it's a good starting point.


On Nov 28, 2007 10:57 AM, Alain Frisch <alain.frisch at lexifi.com> wrote:
> Hello,
> I'm trying to use LLVM on Windows, using the MinGW toolchain that comes
> with Cygwin (gcc -mno-cygwin, not the standalone msys package). Has
> anyone successfully built LLVM from sources with this toolchain?
> The ./configure scripts automatically detects a Cygwin environment. I've
> spent some time trying to let it know that it should compile for MinGW.
> FWIW, here's what I've done:
> * CFLAGS=-mno-cygwin CXXFLAGS=-mno-cygwin ./configure ...
> --build=i686-pc-mingw32 --disable-threads --disable-ltdl-install
> * Put CFLAGS=-mno-cygwin and CXXFLAGS=-mno-cygwin in Makefile.config
> (I could not get the configure script to do it on its own).
> * In include/llvm/Config/config.h, disable HAVE_ARGZ_H and HAVE_LIBDL.
> * Change the Makefile that calls tblgen.exe to pass relative filenames
> to this tool (being compiled as a Win32 application, it cannot deal
> with Cygwin absolute filename like /home/...).
> Still, I get errors. Since I guess I'm not the first one trying to use
> the Cygwin's MinGW compiler, I'd prefer to ask for help before adding
> more hacks to the build system.
> Actually, I think I could live with a binary distribution compiled for
> MinGW. The binary package on the LLVM site (for LLVM 2.1) only contains
> the programs, not the compiled libraries. Can I find those libraries
> somewhere else?
> Also, at some point, I'll be interested in compiling LLVM with the
> Microsoft C compiler (with the command line tools, without Visual
> Studio). Has anyone done that before?
> Thanks!
> Alain
> _______________________________________________
> 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