diff options
author | Dylan Baker <[email protected]> | 2020-04-14 10:06:35 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-21 20:55:12 +0000 |
commit | fdd0ce12ac88e433c7712acd5226fa07dc870057 (patch) | |
tree | 86e8bbbd77e620299ed0a8f06813e7130b5b07b4 | |
parent | 8e3696137f2cb7b4f5a3824f26186ecbb06f9282 (diff) |
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 <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4556>
-rw-r--r-- | meson.build | 14 |
1 files changed, 8 insertions, 6 deletions
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 |