summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2017-12-08 15:26:00 -0800
committerDylan Baker <[email protected]>2018-01-08 16:39:42 -0800
commit42ea0631f108d82554339530d6c88aa1b448af1e (patch)
tree305e2e7dd00136b80dbaba42e0e1dd104349bd8f /meson.build
parent425fcbde3f816e2a2efb8d1aed2442d40898d447 (diff)
meson: build clover
This has only been compile tested. v2: - Have a single option for opencl (Eric E) - fix typo "tgis" -> "tgsi" (Curro) - Don't add "lib" to pipe loader libraries, which matches the autotools behavior v3: - Remove trailing whitespace - Make PIPE_SEARCH_DIR an absolute path v4: - add trailing / to LIBCLC defines Acked-by: Curro Jerez <[email protected]> Tested-by: Jan Vesely <[email protected]> cc: Aaron Watry <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build29
1 files changed, 25 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index ac35819a6e5..cb8ec89e2b4 100644
--- a/meson.build
+++ b/meson.build
@@ -583,6 +583,22 @@ if with_gallium_st_nine
endif
endif
+_opencl = get_option('gallium-opencl')
+if _opencl !=' disabled'
+ if not with_gallium
+ error('OpenCL Clover implementation requires at least one gallium driver.')
+ endif
+
+ # TODO: alitvec?
+ dep_clc = dependency('libclc')
+ with_gallium_opencl = true
+ with_opencl_icd = _opencl == 'icd'
+else
+ dep_clc = []
+ with_gallium_opencl = false
+ with_gallium_icd = false
+endif
+
gl_pkgconfig_c_flags = []
if with_platform_x11
if with_any_vk or (with_glx == 'dri' and with_dri_platform == 'drm')
@@ -930,7 +946,7 @@ dep_thread = dependency('threads')
if dep_thread.found() and host_machine.system() != 'windows'
pre_args += '-DHAVE_PTHREAD'
endif
-if with_amd_vk or with_gallium_radeonsi or with_gallium_r600 # TODO: clover
+if with_amd_vk or with_gallium_radeonsi or with_gallium_r600 or with_gallium_opencl
dep_elf = dependency('libelf', required : false)
if not dep_elf.found()
dep_elf = cc.find_library('elf')
@@ -972,12 +988,19 @@ if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
llvm_modules += 'asmparser'
endif
endif
+if with_gallium_opencl
+ llvm_modules += [
+ 'all-targets', 'linker', 'coverage', 'instrumentation', 'ipo', 'irreader',
+ 'lto', 'option', 'objcarcopts', 'profiledata',
+ ]
+ # TODO: optional modules
+endif
_llvm = get_option('llvm')
if _llvm == 'auto'
dep_llvm = dependency(
'llvm', version : '>= 3.9.0', modules : llvm_modules,
- required : with_amd_vk or with_gallium_radeonsi or with_gallium_swr,
+ required : with_amd_vk or with_gallium_radeonsi or with_gallium_swr or with_gallium_opencl,
)
with_llvm = dep_llvm.found()
elif _llvm == 'true'
@@ -1154,8 +1177,6 @@ else
dep_lmsensors = []
endif
-# TODO: clover
-
# TODO: gallium tests
# TODO: various libdirs