Trouble building release build of swift-llvm on Windows


(NinjaLikesCheez) #1

Hello,

For the last couple of days I've been trying to build a Release version of swift-llvm on windows using Visual Studio 2015 and CMake - however I'm getting some symbol, and include errors with weird paths that I've been struggling with - Google alas has been no help.

I'm passing this through to VS2015 Dev Cmd prompt:
cmake -G "Visual Studio 14 2015 Win64" -Thost=x64 ..\swift-llvm

I'm then building through VS2015 and seeing the following errors - has anyone else seen this before, Debug builds fine on windows - Release builds work fine on Linux/macOS?
1>------ Build started: Project: llvm-tblgen, Configuration: Release x64 ------ 1>SubtargetFeatureInfo.obj : error LNK2019: unresolved external symbol "public: void __cdecl llvm::Record::dump(void)const " (?dump@Record@llvm@@QEBAXXZ) referenced in function "public: void __cdecl llvm::SubtargetFeatureInfo::dump(void)const " (?dump@SubtargetFeatureInfo@llvm@@QEBAXXZ) 1>LLVMTableGen.lib(TGParser.obj) : error LNK2019: unresolved external symbol "public: void __cdecl llvm::Init::dump(void)const " (?dump@Init@llvm@@QEBAXXZ) referenced in function "public: void __cdecl llvm::SubMultiClassReference::dump(void)const " (?dump@SubMultiClassReference@llvm@@QEBAXXZ) 1>LLVMTableGen.lib(TGParser.obj) : error LNK2019: unresolved external symbol "public: void __cdecl llvm::MultiClass::dump(void)const " (?dump@MultiClass@llvm@@QEBAXXZ) referenced in function "public: void __cdecl llvm::SubMultiClassReference::dump(void)const " (?dump@SubMultiClassReference@llvm@@QEBAXXZ) 1>C:\Users\enguser\Desktop\swift-llvm-build\Release\bin\llvm-tblgen.exe : fatal error LNK1120: 3 unresolved externals

And the import error (repeated hundreds of times - notice the odd /\ in path):

C:\Users\user\Desktop\swift-llvm\include\llvm/IR/Attributes.h(71): fatal error C1083: Cannot open include file: 'llvm/IR/Attributes.gen': No such file or directory (compiling source file C:\Users\user\Desktop\swift-llvm\lib\CodeGen\MachineBlockPlacement.cpp)

Thanks - I'm probably just doing something stupidly wrong.

Thomas.