[LLVMdev] building llvm on Windows
Razvan Aciu
admin at kam.ro
Sun May 11 12:59:30 PDT 2008
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
More information about the llvm-dev
mailing list