Module: Mesa Branch: staging/20.0 Commit: 8d13ea15710f90485f1fec915e3ed0d5a4aecf5b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d13ea15710f90485f1fec915e3ed0d5a4aecf5b
Author: Dylan Baker <[email protected]> Date: Tue Apr 14 10:06:35 2020 -0700 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> (cherry picked from commit fdd0ce12ac88e433c7712acd5226fa07dc870057) --- .pick_status.json | 2 +- meson.build | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 679f4e733f9..cd06662184a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -490,7 +490,7 @@ "description": "meson: update llvm dependency logic for meson 0.54.0", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "821cf6942a390f5f64d8a2cff9933b24c84f7dc1" }, diff --git a/meson.build b/meson.build index c48945b3c48..ebccd56f169 100644 --- a/meson.build +++ b/meson.build @@ -1395,12 +1395,14 @@ 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' +# 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 _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
