diff options
author | Dylan Baker <[email protected]> | 2019-05-22 11:01:17 -0700 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-06-27 22:12:02 +0000 |
commit | 5157a4276500c77e2210e853b262be1d1b30aedf (patch) | |
tree | 438de28db2d49f827138ba883c4bee4d9d2fda42 /src/gallium/targets | |
parent | 3d3685d3548f7e4fbabafb5b3a184486a5274c23 (diff) |
meson: Add support for using cmake for finding LLVM
Meson has support for using cmake as a finder for some dependencies,
including LLVM. Using cmake has a lot of advantages: it needs less meson
maintenance to keep working (even for llvm updates); it works more
sanely for cross compiles (as llvm-config is a compiled binary not a
shell script). Meson 0.51.0 also has a new generic variable getter that
can be used to get information from either cmake, pkg-config, or
config-tools dependencies, which is needed for cmake. We continue to
support using llvm-config if you don't have cmake installed, or if cmake
cannot find a suitable version.
Fixes: 0d59459432cf077d768164091318af8fb1612500
("meson: Force the use of config-tool for llvm")
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/gallium/targets')
-rw-r--r-- | src/gallium/targets/opencl/meson.build | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build index 317ad8dab4a..676e0e13174 100644 --- a/src/gallium/targets/opencl/meson.build +++ b/src/gallium/targets/opencl/meson.build @@ -29,7 +29,11 @@ if with_ld_version_script opencl_link_deps += files('opencl.sym') endif -llvm_libdir = dep_llvm.get_configtool_variable('libdir') +if meson.version().version_compare('>=0.51') + llvm_libdir = dep_llvm.get_variable(configtool : 'libdir', cmake : 'LLVM_LIBRARY_DIR') +else + llvm_libdir = dep_llvm.get_configtool_variable('libdir') +endif opencl_libname = with_opencl_icd ? 'MesaOpenCL' : 'OpenCL' |