From: Dylan Baker Date: Tue, 14 Apr 2020 17:06:35 +0000 (-0700) Subject: meson: update llvm dependency logic for meson 0.54.0 X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=commitdiff_plain;h=fdd0ce12ac88e433c7712acd5226fa07dc870057 meson: update llvm dependency logic for meson 0.54.0 In meson 0.54.0 I fixed the llvm cmake dependency to return "not found" if shared linking is requested. This means that for 0.54.0 and later we don't need to do anything, and for earlier versions we only need to change the logic to force the config-tool method if shared linking is required. Fixes: 821cf6942a390f5f64d8a2cff9933b24c84f7dc1 ("meson: Use cmake to find LLVM when building for window") Acked-by: Marek Olšák Reviewed-by: Eric Engestrom Part-of: --- diff --git a/meson.build b/meson.build index 3623d3dc0fd..0bd8e3bd8ff 100644 --- a/meson.build +++ b/meson.build @@ -1413,12 +1413,14 @@ else endif _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' +# the cmake method can only link statically, so don't attempt to use it if we +# want to link dynamically. Before 0.54.0 meson will try cmake even when shared +# linking is requested, so we need to force the config-tool method to be used +# in that case, but in 0.54.0 meson won't try the cmake method if shared +# linking is requested. +_llvm_method = 'auto' +if meson.version().version_compare('< 0.54.0') and _shared_llvm + _llvm_method = 'config-tool' endif dep_llvm = null_dep