I tried to compile on Windows ( using the win32/llvm.sln in MSVC Express 2008 ) the new 2.3 branch and here are the results: 1. I needed to copy the file Configure.exe.embed.manifest to Configure.exe.intermediate.manifest . This is a bug from the previous llvm release (2.2) 2. I copied the file SimplifyLibCalls.cpp from lib/Transforms/Scalar to lib/Transforms/IPO. I think the position of this file was updated but the MSVC project wasn't. 3. I put a "return SDOperand();" on X86ISelLowering.cpp, on function "SDOperand X86TargetLowering::LowerVAARG(SDOperand Op, SelectionDAG &DAG)" after "abort()", to make compiler happy to compile it. 4. I needed to give "Build Solution" more times, because there are some incorrect dependencies between projects and some of them expect results from the future builded ones. After over 4500 warnings, I think most of them because of the automatically generated code, I succeded to compile almost all the projects, except opt and bugpoint. At these two I had an error: error LNK2019: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createLibCallAliasAnalysisPass(class llvm::LibCallInfo *)" (?createLibCallAliasAnalysisPass at llvm@@YAPAVFunctionPass at 1@PAVLibCallInfo at 1@@Z) referenced in function "public: __thiscall `anonymous namespace'::ForcePassLinking::ForcePassLinking(void)" (??0ForcePassLinking@?A0xd1580448@@QAE at XZ) which I wasn't able to fix it. I hope these will be fixed on the final 2.3 release so it can be compiled out of the box on MSVC Express 2008. Now I'm checking on some Windows assemblers and other tools which can complete llvm to make it a full backend (with the final result an exe or dll file). Razvan PS: I also tried to compile llvm 2.3 in MSYS using the latest MinGW with gcc 4.3.0. This wasn't able to compile llvm at all because some errors like: d:\msys\bin\../lib/gcc/i386-pc-mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In member function 'bool __gnu_cxx::_EqualOpConcept<_First, _Second>::__constraints_() [with _First = llvm::BasicBlock, _Second = llvm::BasicBlock*]': d:\msys\bin\../lib/gcc/i386-pc-mingw32/4.3.0/include/c++/bits/boost_concept_check.h:296: instantiated from 'void __gnu_cxx::_EqualOpConcept<_First, _Second>::__constraints() [with _First = llvm::BasicBlock, _Second = llvm::BasicBlock*]' d:\msys\bin\../lib/gcc/i386-pc-mingw32/4.3.0/include/c++/bits/boost_concept_check.h:62: instantiated from 'void __gnu_cxx::__function_requires() [with _Concept = __gnu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::BasicBlock*>]' d:\msys\bin\../lib/gcc/i386-pc-mingw32/4.3.0/include/c++/bits/stl_algo.h:3810: instantiated from '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = llvm::PredIterator<llvm::BasicBlock, llvm::value_use_iterator<llvm::User> >, _Tp = llvm::BasicBlock*]' BasicBlock.cpp:180: instantiated from here d:\msys\bin\../lib/gcc/i386-pc-mingw32/4.3.0/include/c++/bits/boost_concept_check.h:296: error: no match for 'operator==' in '((__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::BasicBlock*>*)this)->__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::BasicBlock*>::__a == ((__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::BasicBlock*>*)this)->__gnu_cxx::_EqualOpConcept<llvm::BasicBlock, llvm::BasicBlock*>::__b' D:/msys/home/Razvan/release_23/include/llvm/ADT/APInt.h:1242: note: candidates are: bool llvm::operator==(uint64_t, const llvm::APInt&) make[1]: *** [/home/Razvan/release_23/lib/VMCore/Release/BasicBlock.o] Error 1
Razvan Aciu
2008-May-13 12:34 UTC
[LLVMdev] patch for building llvm on Windows with MSVC 2008
These are the updated .sln and .vcproj files for building llvm with MSVC 2008. It turned out that the compiling errors were because these projects wasn't updated to reflect the actual status of the llvm files. I checked all the files (removed, moved or added) and now they are ok. It compiles all targets from the first "Build Solution", both for Debug and for Release mode. You need the latest release_23 files. I also added a compiling.txt with some notes. The .sln and .vcproj files now are updated to the 2008 version of MSVC Express (my development environment). If you want to keep compatibility with MSVC 2005, someone with that environment needs to take the old project files and sync them with the current llvm files. TODO Not all llvm subprojects have a corresponding .vcproj. Notably msil, ia64 or other examples than Fibonacci doesn't have it. It is very simple to add it, following the model of the current projects in solution, but I don't want to make these now. Razvan -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm.zip Type: application/x-zip-compressed Size: 58554 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080513/2cfe9de9/attachment.bin>