Ok, more recent developments follow. I updated my MSYS and MinGW install to use binutils 2.20 and gcc 4.4.0. With this I was able to build LLVM 2.6 with the following CMake configuration:
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PIC=NO -DLLVM_ENABLE_THREADS=NO -G "MSYS Makefiles" ~/llvm-2.6-src
I also downloaded the llvm-gcc 4.2 binaries from llvm.org and used them to build an alternate llvm system using the following configuration:
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PIC=NO -DLLVM_ENABLE_THREADS=NO -DCMAKE_C_COMPILER=llvm-gcc -DCMAKE_CXX_COMPILER=llvm-g++ -G "MSYS Makefiles" ~/llvm-2.6-src
llvm-config seems to work better in both builds (at least listing more dependencies). Using the gcc version:
$ llvm-config --libs x86
-lLLVMX86AsmParser -lLLVMX86AsmPrinter -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter
-lLLVMCodeGen -lLLVMScalarOpts -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC
-lLLVMCore -lLLVMX86Info -lLLVMSupport -lLLVMSystem
and using the llvm-gcc version:
$ ~/llvm-2.6-gcc/bin/llvm-config --libs x86
-lLLVMX86AsmParser -lLLVMX86AsmPrinter -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter
-lLLVMCodeGen -lLLVMScalarOpts -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC
-lLLVMCore -lLLVMX86Info -lLLVMSupport -lLLVMSystem
I then used both of these builds to attempt to assemble and link my project with llvm-g++:
$ llvm-g++ out.s -o out.exe `llvm-config --ldflags --libs x86 core system support`
gave me the errors found in the attached file "errors_gcc.txt". And
$ llvm-g++ out.s -o out.exe `~/llvm-2.6-gcc/bin/llvm-config --ldflags --libs x86 core system support`
gave me the errors found in the attached file "errors_llvm-gcc.txt".
I found it interesting that the attempt to link with the LLVM libs built with gcc caused several "multiple definition" errors, whereas the attempt to link with the libs built by llvm-gcc cause no multiple definitions but many more stdcall-fixup warnings.
Both attempts failed to link, citing llvm::Type::Int32Ty as unresolved among other things. Isn't llvm::Type in Core?
I appears I'm closer using the llvm-gcc build, but still unable to link everything correctly. Any other ideas?
Thanks,
--Mike
errors_gcc.txt (11 KB)
errors_llvm-gcc.txt (5.18 KB)