Module: Mesa Branch: master Commit: 821cf6942a390f5f64d8a2cff9933b24c84f7dc1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=821cf6942a390f5f64d8a2cff9933b24c84f7dc1
Author: Dylan Baker <dy...@pnwbakers.com> Date: Thu Jul 25 14:27:43 2019 -0700 meson: Use cmake to find LLVM when building for windows We don't use cmake normally because it always results in static linking. This is very problematic for *nix OSes which expect shared linking by default, but for windows this isn't a problem as LLVM doesn't support shared linking on windows anyway. Reviewed-by: Adam Jackson <a...@redhat.com> --- meson.build | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 2d8668e601b..00cf3e017ab 100644 --- a/meson.build +++ b/meson.build @@ -1368,8 +1368,16 @@ else endif _shared_llvm = get_option('shared-llvm') - _llvm = get_option('llvm') + +# The cmake method will never find libllvm.so|dylib; this is fine for windows +# because llvm doesn't support libllvm.dll +_llvm_method = 'config-tool' +if (meson.version().version_compare('>= 0.51.0') and + host_machine.system() == 'windows') + _llvm_method = 'cmake' +endif + dep_llvm = null_dep with_llvm = false if _llvm != 'false' @@ -1383,7 +1391,7 @@ if _llvm != 'false' with_gallium_opencl or _llvm == 'true' ), static : not _shared_llvm, - method : 'config-tool', + method : _llvm_method, fallback : ['llvm', 'dep_llvm'], ) with_llvm = dep_llvm.found() _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit