meson: try to find clang-cpp before going through each module
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13171>
This commit is contained in:

committed by
Marge Bot

parent
ec6e247a40
commit
b1e7ce84cc
24
meson.build
24
meson.build
@@ -1783,17 +1783,21 @@ dep_clang = null_dep
|
||||
if with_clc
|
||||
llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
|
||||
|
||||
clang_modules = [
|
||||
'clangBasic', 'clangAST', 'clangCodeGen', 'clangLex',
|
||||
'clangDriver', 'clangFrontend', 'clangFrontendTool',
|
||||
'clangHandleCXX', 'clangHandleLLVM', 'clangSerialization',
|
||||
'clangSema', 'clangParse', 'clangEdit', 'clangAnalysis'
|
||||
]
|
||||
dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
|
||||
|
||||
dep_clang = []
|
||||
foreach m : clang_modules
|
||||
dep_clang += cpp.find_library(m, dirs : llvm_libdir, required : true)
|
||||
endforeach
|
||||
if not dep_clang.found()
|
||||
clang_modules = [
|
||||
'clangBasic', 'clangAST', 'clangCodeGen', 'clangLex',
|
||||
'clangDriver', 'clangFrontend', 'clangFrontendTool',
|
||||
'clangHandleCXX', 'clangHandleLLVM', 'clangSerialization',
|
||||
'clangSema', 'clangParse', 'clangEdit', 'clangAnalysis'
|
||||
]
|
||||
|
||||
dep_clang = []
|
||||
foreach m : clang_modules
|
||||
dep_clang += cpp.find_library(m, dirs : llvm_libdir, required : true)
|
||||
endforeach
|
||||
endif
|
||||
endif
|
||||
|
||||
# Be explicit about only using this lib on Windows, to avoid picking
|
||||
|
Reference in New Issue
Block a user