llvm-gcc mingw-w64 64-bit version


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 do not build applications (not surprisingly) for 64-bit Windows 7 (-m64 is disabled).

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 cygwin.

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


Hi Raj, since llvm-gcc is deprecated and won't be part of the next release,
I suggest you concentrate on clang.

Ciao, Duncan.