<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">Well I am more used with the merge / pull request model of sending patches so I am going to link it instead of inlining:</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><a href="https://raw.githubusercontent.com/pal1000/mesa-dist-win/master/patches/upstream/scons-swr-llvm7.patch" rel="nofollow" target="_blank">https://raw.githubusercontent.com/pal1000/mesa-dist-win/master/patches/upstream/scons-swr-llvm7.patch</a></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">This patch depends on <a href="https://patchwork.freedesktop.org/series/50108/">series 50108</a> to be effective but it can be safely merged either before or after it.</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">Unfortunately this patch doesn't help osmesa linking with swr when using llvm >= 7 which is also an issue unaddressed by series 50108.</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">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.<br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"> <br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><span>Generating code<br>Finished generating code<br>Finished generating code<br>Finished generating code<br> Archiving build\windows-x86_64\gallium\drivers\swr\swr.lib ...<br> Linking build\windows-x86_64\gallium\targets\osmesa\osmesa.dll ...<br> Linking build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.dll ...<br> Creating library build\windows-x86_64\gallium\targets\osmesa\osmesa.lib and object build\windows-x86_64\gallium\targets\osmesa\osmesa.exp<br> Creating library build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.lib and object build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.exp<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationUseLegacyPass(class llvm::StringRef)" (?createPGOInstrumentationUseLegacyPass@llvm@@YAPEAVModulePass@1@VStringRef@1@@Z)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationGenLegacyPass(void)" (?createPGOInstrumentationGenLegacyPass@llvm@@YAPEAVModulePass@1@XZ)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createPGOMemOPSizeOptLegacyPass(void)" (?createPGOMemOPSizeOptLegacyPass@llvm@@YAPEAVFunctionPass@1@XZ)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOIndirectCallPromotionLegacyPass(bool,bool)" (?createPGOIndirectCallPromotionLegacyPass@llvm@@YAPEAVModulePass@1@_N0@Z)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createInstrProfilingLegacyPass(struct llvm::InstrProfOptions const &)" (?createInstrProfilingLegacyPass@llvm@@YAPEAVModulePass@1@AEBUInstrProfOptions@1@@Z)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "public: static struct llvm::GCOVOptions __cdecl llvm::GCOVOptions::getDefault(void)" (?getDefault@GCOVOptions@llvm@@SA?AU12@XZ)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createBoundsCheckingLegacyPass(void)" (?createBoundsCheckingLegacyPass@llvm@@YAPEAVFunctionPass@1@XZ)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createGCOVProfilerPass(struct llvm::GCOVOptions const &)" (?createGCOVProfilerPass@llvm@@YAPEAVModulePass@1@AEBUGCOVOptions@1@@Z)<br>build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.dll : fatal error LNK1120: 8 unresolved externals<br>scons: *** [build\windows-x86_64\gallium\targets\libgl-gdi\opengl32.dll] Error 1120<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationUseLegacyPass(class llvm::StringRef)" (?createPGOInstrumentationUseLegacyPass@llvm@@YAPEAVModulePass@1@VStringRef@1@@Z)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOInstrumentationGenLegacyPass(void)" (?createPGOInstrumentationGenLegacyPass@llvm@@YAPEAVModulePass@1@XZ)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createPGOMemOPSizeOptLegacyPass(void)" (?createPGOMemOPSizeOptLegacyPass@llvm@@YAPEAVFunctionPass@1@XZ)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createPGOIndirectCallPromotionLegacyPass(bool,bool)" (?createPGOIndirectCallPromotionLegacyPass@llvm@@YAPEAVModulePass@1@_N0@Z)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createInstrProfilingLegacyPass(struct llvm::InstrProfOptions const &)" (?createInstrProfilingLegacyPass@llvm@@YAPEAVModulePass@1@AEBUInstrProfOptions@1@@Z)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "public: static struct llvm::GCOVOptions __cdecl llvm::GCOVOptions::getDefault(void)" (?getDefault@GCOVOptions@llvm@@SA?AU12@XZ)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::FunctionPass * __cdecl llvm::createBoundsCheckingLegacyPass(void)" (?createBoundsCheckingLegacyPass@llvm@@YAPEAVFunctionPass@1@XZ)<br>swr.lib(JitManager.obj) : error LNK2001: unresolved external symbol "class llvm::ModulePass * __cdecl llvm::createGCOVProfilerPass(struct llvm::GCOVOptions const &)" (?createGCOVProfilerPass@llvm@@YAPEAVModulePass@1@AEBUGCOVOptions@1@@Z)<br>build\windows-x86_64\gallium\targets\osmesa\osmesa.dll : fatal error LNK1120: 8 unresolved externals<br>scons: *** [build\windows-x86_64\gallium\targets\osmesa\osmesa.dll] Error 1120<br>scons: building terminated because of errors.</span><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div></div></body></html>