[Mesa-dev] [Mesa-stable] [PATCH] Scons: swr: fix LLVM >= 7 build

Liviu Prodea liviuprodea at yahoo.com
Sat Oct 6 19:08:58 UTC 2018


Well I am more used with the merge / pull request model of sending patches so I am going to link it instead of inlining:

https://raw.githubusercontent.com/pal1000/mesa-dist-win/master/patches/upstream/scons-swr-llvm7.patch

This patch depends on series 50108 to be effective but it can be safely merged either before or after it.

Unfortunately this patch doesn't help osmesa linking with swr when using llvm >= 7 which is also an issue unaddressed by series 50108.

If you try to build both swr and osmesa together when using LLVM 7.0 with Scons you get this after applying this patch otherwise would be way more unresolved symbols. This patch cuts 41 unresolved symbols resulting in successful build when not building osmesa.

 

Generating code
Finished generating code
Finished generating code
Finished generating code
  Archiving build\windows-x86_64\gallium\drivers\swr\swr.lib ...
  Linking build\windows-x86_64\gallium\targets\osmesa\osmesa.dll ...
  Linking build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.dll ...
   Creating library build\windows-x86_64\gallium\targets\osmesa\osmesa.lib and object build\windows-x86_64\gallium\targets\osmesa\osmesa.exp
   Creating library build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.lib and object build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.exp
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationUseLegacyPass(class llvm::StringRef)" (?createPGOInstrumentationUseLegacyPass at llvm@@YAPEAVModulePass at 1@VStringRef at 1@@Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationGenLegacyPass(void)" (?createPGOInstrumentationGenLegacyPass at llvm@@YAPEAVModulePass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createPGOMemOPSizeOptLegacyPass(void)" (?createPGOMemOPSizeOptLegacyPass at llvm@@YAPEAVFunctionPass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOIndirectCallPromotionLegacyPass(bool,bool)" (?createPGOIndirectCallPromotionLegacyPass at llvm@@YAPEAVModulePass at 1@_N0 at Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createInstrProfilingLegacyPass(struct llvm::InstrProfOptions const &)" (?createInstrProfilingLegacyPass at llvm@@YAPEAVModulePass at 1@AEBUInstrProfOptions at 1@@Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "public: static struct llvm::GCOVOptions __cdecl llvm::GCOVOptions::getDefault(void)" (?getDefault at GCOVOptions@llvm@@SA?AU12 at XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createBoundsCheckingLegacyPass(void)" (?createBoundsCheckingLegacyPass at llvm@@YAPEAVFunctionPass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createGCOVProfilerPass(struct llvm::GCOVOptions const &)" (?createGCOVProfilerPass at llvm@@YAPEAVModulePass at 1@AEBUGCOVOptions at 1@@Z)
build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.dll : fatal error LNK1120: 8 unresolved externals
scons: *** [build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.dll] Error 1120
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationUseLegacyPass(class llvm::StringRef)" (?createPGOInstrumentationUseLegacyPass at llvm@@YAPEAVModulePass at 1@VStringRef at 1@@Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationGenLegacyPass(void)" (?createPGOInstrumentationGenLegacyPass at llvm@@YAPEAVModulePass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createPGOMemOPSizeOptLegacyPass(void)" (?createPGOMemOPSizeOptLegacyPass at llvm@@YAPEAVFunctionPass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOIndirectCallPromotionLegacyPass(bool,bool)" (?createPGOIndirectCallPromotionLegacyPass at llvm@@YAPEAVModulePass at 1@_N0 at Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createInstrProfilingLegacyPass(struct llvm::InstrProfOptions const &)" (?createInstrProfilingLegacyPass at llvm@@YAPEAVModulePass at 1@AEBUInstrProfOptions at 1@@Z)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "public: static struct llvm::GCOVOptions __cdecl llvm::GCOVOptions::getDefault(void)" (?getDefault at GCOVOptions@llvm@@SA?AU12 at XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createBoundsCheckingLegacyPass(void)" (?createBoundsCheckingLegacyPass at llvm@@YAPEAVFunctionPass at 1@XZ)
swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createGCOVProfilerPass(struct llvm::GCOVOptions const &)" (?createGCOVProfilerPass at llvm@@YAPEAVModulePass at 1@AEBUGCOVOptions at 1@@Z)
build\windows-x86_64\gallium\targets\osmesa\osmesa.dll : fatal error LNK1120: 8 unresolved externals
scons: *** [build\windows-x86_64\gallium\targets\osmesa\osmesa.dll] Error 1120
scons: building terminated because of errors.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181006/c82761d7/attachment.html>


More information about the mesa-dev mailing list