clover: Check if the detected clang libraries are usable
authorJan Vesely <jano.vesely@gmail.com>
Sat, 4 Apr 2020 18:59:35 +0000 (14:59 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Apr 2020 16:29:44 +0000 (16:29 +0000)
commit8cbeb13704a59034ffe19a7ffef7b3856a1733e8
tree5df1fec7e9b548803ad8a67f4f4ddd3623c4fa0f
parent839c886b346e0f68707804e17e9088d2e166e6d6
clover: Check if the detected clang libraries are usable

clang-cpp.so is broken in LLVM-9 and doesn't exist in LLVM<9,
however meson will find and try to use system libraries in these cases.

v2: Use helper variable to dedpulicate test code
    Move second test inside the condition to avoid testing good clang-cpp twice
v3: Check for cross compilation
v4: style fixes

Fixes: ff1a3a00cb37d84ab9a563f0aa241714876f56b4
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Tested-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4457>
src/gallium/targets/opencl/meson.build