[LLVMdev] llvm-gcc mingw-w64 64-bit version

Raj Barik rkbarik at gmail.com
Wed Oct 26 17:41:34 PDT 2011


Has anyone built llvm-gcc-4.2-2.9 using mingw-w64 on Windows 7 64-bit OS?

The binaries available in the download website LLVM-GCC 4.2 Front End
Binaries for Mingw32/x86<http://llvm.org/releases/2.9/llvm-gcc4.2-2.9-x86-mingw32.tar.bz2>
not build applications (not surprisingly) for 64-bit Windows 7 (-m64 is

I am both compiling and linking an application (to produce a 64-bit
executable) that imports functions from a 64-bit library DLL that was
produced by Visual Studio 2010 (these functions are exported from the
library DLL).
When I use clang-2.9 (I built clang-2.9 using CMake and mingw-w64) to
compile the application (used flag -m64) and then link it with the 64-bit
library DLL using mingw-w64-g++, it links fine, but, the generated executable
when executed, silently quits the application just before making calls to
imported functions. Everything before the first imported function is
executed fine.

On the other side, if I use mingw-w64-g++ to both compile and link the same
application, I can execute the executable perfectly fine.

It seems like clang-2.9 looses some information on dllimports.

The reason I want to use clang or llvm-g++ is that I want to apply some of
the LLVM transformations (and possibly develop new ones).

Any idea how to tackle this problem?

The llvm-gcc-4.2-2.9-source distribution does not contain CMake files that I
can easily build using cmake on Windows.
It comes with standard Makefiles which I can not build successfully using

Once again, let me know if anybody has built llvm-gcc-4.2-2.9 using
mingw-w64 on Windows 7 64-bit OS.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111026/e5b8b2b3/attachment.html>

More information about the llvm-dev mailing list