Commit f8497a6f authored by Jan Palus's avatar Jan Palus

targets/opencl: add build-time conflict for LLVM 10.0.0

LLVM 10.0.0 required static linking of Polly otherwise compilation
failed. LLVM 10.0.1 statically links Polly to libLLVM which causes
issues such as #3494 due to Polly being present in multiple libraries.
As a solution drop static Polly linking and conflict with the only LLVM
version which requires it.
parent a3543adc
Pipeline #206110 waiting for manual action with stages
......@@ -32,13 +32,6 @@ endif
llvm_libdir = dep_llvm.get_configtool_variable('libdir')
opencl_libname = with_opencl_icd ? 'MesaOpenCL' : 'OpenCL'
polly_dep = null_dep
polly_isl_dep = null_dep
if dep_llvm.version().version_compare('>=10.0.0')
polly_dep = cpp.find_library('Polly', dirs : llvm_libdir, required : false)
polly_isl_dep = cpp.find_library('PollyISL', dirs : llvm_libdir, required : false)
endif
dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
# meson will return clang-cpp from system dirs if it's not found in llvm_libdir
......@@ -59,6 +52,9 @@ else
dep_clang_usable = true
endif
if not (dep_clang.found() and dep_clang_usable)
if dep_llvm.version().version_compare('=10.0.0')
error('LLVM 10.0.0 is not supported for building opencl')
endif
dep_clang = [
cpp.find_library('clangCodeGen', dirs : llvm_libdir),
cpp.find_library('clangFrontendTool', dirs : llvm_libdir),
......@@ -73,7 +69,6 @@ if not (dep_clang.found() and dep_clang_usable)
cpp.find_library('clangEdit', dirs : llvm_libdir),
cpp.find_library('clangLex', dirs : llvm_libdir),
cpp.find_library('clangBasic', dirs : llvm_libdir),
polly_dep, polly_isl_dep,
]
# check clang once more
if can_check_clang
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment