[Mesa-dev] [PATCH v2 00/49] meson for windows

Liviu Prodea liviuprodea at yahoo.com
Thu Jul 19 07:40:33 UTC 2018


Review for Meson windows support v2
1. osmesa Scons build doesn't use lib prefix on windows platform. I don't know much of cygwin though.Sent a merge request to ensure parity - https://gitlab.freedesktop.org/dbaker/mesa/merge_requests/2
2. Problem linking LLVM. 

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 https://gitlab.freedesktop.org/mesa/mesa/blob/master/scons/llvm.py#L106
b. I wrote a llvm wrap generator 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.
llvm wrap meson.build
project('llvm', ['cpp']) 
 
cpp = meson.get_compiler('cpp') 
 
_deps = [] 
_search = join_paths(meson.current_source_dir(), '../../../llvm/x64/lib') 
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'] 
  _deps += cpp.find_library(d, dirs : _search) 
endforeach 
 
ext_llvm = declare_dependency( 
  include_directories : include_directories(join_paths(meson.current_source_dir(), '../../../llvm/x64/include')), 
  dependencies : _deps, 
  version : '6.0.1', 
) 
 
irbuilder_h = files(join_paths(meson.current_source_dir(), '../../../llvm/x64/include/llvm/IR/IRBuilder.h')) 




LLVM build config: 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

Mesa3D build config command: 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

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


More information about the mesa-dev mailing list