MinGW - LLVM Pass - Undefined Reference

Hi,

I have installed the latest MinGW (version 4.6.3 i386, not version 3.X) and then compiled the LLVM source files (version 2.9) on Windows platform (using the default configuration). It seems that those binary tools (such as llvm-bcanalyzer, opt, etc.) have been successfully generated, as they even work well with existing bitcode files compiled and linked on Linux platform (Ubuntu 8.04/10.04/10.10 x86_64).

The sample LLVM pass (namely /lib/LLVMHello.so), however, has not been generated. Especially once I compile any LLVM pass, the MinGW linker (version 2.22 i386) reports many errors due to various undefined references. Thus I wonder whether the LLVM framework supports developing LLVM passes with MinGW or not, or if there are some special issues I missed when compiling the LLVM source files.

Many thanks.

Feng

The sample LLVM pass (namely /lib/LLVMHello.so), however, has not been generated. Especially once I compile any LLVM pass, the MinGW linker (version 2.22 i386) reports many errors due to various undefined references. Thus I wonder whether the LLVM framework supports developing LLVM passes with MinGW or not, or if there are some special issues I missed when compiling the LLVM source files.

You can surely develop passes using mingw. You just cannot use
loadable passes on windows since there is no "proper" dynamic linking
there.