vendredi 29 décembre 2017

Unable to compile LLVM 5.0.0 with MSVC 14.0

I am trying to compile LLVM 5.0.0 from source on Windows 10 with Visual Studio 14.0 (2015).

I used the following cmake flags:

CMAKEOPTIONS += -D PYTHON_EXECUTABLE:PATH=$(PYTHON_PATH)/bin/python
CMAKEOPTIONS += -D LLVM_ENABLE_TERMINFO=0
CMAKEOPTIONS += -D LLVM_ENABLE_EH=1
CMAKEOPTIONS += -D LLVM_ENABLE_RTTI=1
CMAKEOPTIONS += -D LLVM_ENABLE_ASSERTIONS:BOOL=ON -D LLVM_ABI_BREAKING_CHECKS:STRING="FORCE_OFF"

The compilation fails with:

Severity Code Description Project File Line Suppression State Error C2039 'iterator_facade_base,0,1>

,std::forward_iterator_tag,llvm::PHINode const ,__int64,llvm::PHINode const *,llvm::PHINode const &>': is not a member of 'llvm::BasicBlock::phi_iterator_impl' (compiling source file S:\authama\3p-tmw\3p\derived\win64\LLVM5\llvm-debug\lib\Target\AMDGPU\Utils\AMDGPUBaseInfo.cpp) LLVMAMDGPUUtils s:\authama\3p-tmw\3p\derived\win64\llvm5\llvm-debug\include\llvm\ir\basicblock.h 294

Which points to:

290     bool operator==(const phi_iterator_impl &Arg) const { return PN == Arg.PN; }
291 
292     PHINodeT &operator*() const { return *PN; }
293 
294     using phi_iterator_impl::iterator_facade_base::operator++;
295     phi_iterator_impl &operator++() {
296       assert(PN && "Cannot increment the end iterator!");
297       PN = dyn_cast<PHINodeT>(std::next(BBIteratorT(PN)));
298       return *this;
299     }

The source compiles with GCC 4.9/Debian8, so I am guessing I missed something to do with setting up the compiler correctly. Any suggestions for me to try?

Aucun commentaire:

Enregistrer un commentaire