<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;"><div id="ydpf7668252yiv9863409453"><div><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;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><span><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">Review for <a href="https://patchwork.freedesktop.org/series/46279/" rel="nofollow" target="_blank">Meson windows support v2</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;">1. osmesa Scons build doesn't use lib prefix on windows platform. I don't know much of cygwin though.</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">Sent a merge request to ensure parity - <a href="https://gitlab.freedesktop.org/dbaker/mesa/merge_requests/2" rel="nofollow" target="_blank">https://gitlab.freedesktop.org/dbaker/mesa/merge_requests/2</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;">2. Problem linking LLVM. <br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div></span><div><span><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">a.
 The LLVM wrap example in the docs doesn't specify from what llvm-config
 command that libraries array comes from. With Scons this is documented 
in the code itself <a href="https://gitlab.freedesktop.org/mesa/mesa/blob/master/scons/llvm.py#L106" rel="nofollow" target="_blank">https://gitlab.freedesktop.org/mesa/mesa/blob/master/scons/llvm.py#L106</a></div></span></div><div><br></div><div><span><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">b. I wrote a <a href="https://github.com/pal1000/mesa-dist-win/blob/master/buildscript/modules/llvmwrapgen.cmd" rel="nofollow" target="_blank">llvm wrap generator</a>
 based on that documentation making the assumption the needed libraries 
are the same as with Scons. Unfortunately I get static - dynamic link 
mismatches for all LLVM libraries. Maybe I am doing something wrong or I
 need to build LLVM differently (hopefully mot) or it's a bug.</div></span></div><div><br></div><div>llvm wrap meson.build</div><div><br></div><div><span>project('llvm', ['cpp']) <br> <br>cpp = meson.get_compiler('cpp') <br> <br>_deps = [] <br>_search = join_paths(meson.current_source_dir(), '../../../llvm/x64/lib') <br>foreach d : ['LLVMIRReader', 'LLVMAsmParser', 'LLVMX86Disassembler', 'LLVMX86AsmParser', 'LLVMX86CodeGen', 'LLVMGlobalISel', 'LLVMSelectionDAG', 'LLVMAsmPrinter', 'LLVMDebugInfoCodeView', 'LLVMDebugInfoMSF', 'LLVMCodeGen', 'LLVMScalarOpts', 'LLVMInstCombine', 'LLVMTransformUtils', 'LLVMBitWriter', 'LLVMX86Desc', 'LLVMMCDisassembler', 'LLVMX86Info', 'LLVMX86AsmPrinter', 'LLVMX86Utils', 'LLVMMCJIT', 'LLVMExecutionEngine', 'LLVMTarget', 'LLVMAnalysis', 'LLVMProfileData', 'LLVMRuntimeDyld', 'LLVMObject', 'LLVMMCParser', 'LLVMBitReader', 'LLVMMC', 'LLVMCore', 'LLVMBinaryFormat', 'LLVMSupport', 'LLVMDemangle'] <br>  _deps += cpp.find_library(d, dirs : _search) <br>endforeach <br> <br>ext_llvm = declare_dependency( <br>  include_directories : include_directories(join_paths(meson.current_source_dir(), '../../../llvm/x64/include')), <br>  dependencies : _deps, <br>  version : '6.0.1', <br>) <br> <br>irbuilder_h = files(join_paths(meson.current_source_dir(), '../../../llvm/x64/include/llvm/IR/IRBuilder.h')) <br><br></span><div><br></div><div><br></div><div><br></div></div><span></span><div><span>LLVM build config: <span>cmake
 -G "Ninja" -Thost=x64 -DLLVM_TARGETS_TO_BUILD=X86 
-DCMAKE_BUILD_TYPE=Release -DLLVM_USE_CRT_RELEASE=MT 
-DLLVM_ENABLE_RTTI=1 -DLLVM_ENABLE_TERMINFO=OFF 
-DCMAKE_INSTALL_PREFIX=../x64</span><br></span></div><div><span><br></span></div><div><span>Mesa3D build config command: <span><span><span>C:\Software\DEVELO~1\projects\mesa\Py3\python.exe 
C:\Software\DEVELO~1\projects\mesa\Py3\Scripts\meson.py . 
.\build\windows-x86_64 --backend=ninja --buildtype=release 
-Dllvm-wrap=llvm -Dosmesa=gallium</span></span></span><br></span></div><div><br></div><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;"></div></div></div></div></div></div></div></div></div></body></html>