Mesa (main): clc: Fix build with llvm-15.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jun 5 06:39:52 UTC 2022
Module: Mesa
Branch: main
Commit: 3e679219a110ecff858ef7cc94d01a7df17e884c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3e679219a110ecff858ef7cc94d01a7df17e884c
Author: Vinson Lee <vlee at freedesktop.org>
Date: Tue May 31 21:24:15 2022 -0700
clc: Fix build with llvm-15.
opencl_c_h is defined only for llvm < 15.
Fixes: bcc2df48905 ("clc: speed up compilation by not relying on opencl-c.h")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16808>
---
src/compiler/clc/meson.build | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build
index 561f57152a9..a082a877c60 100644
--- a/src/compiler/clc/meson.build
+++ b/src/compiler/clc/meson.build
@@ -37,6 +37,11 @@ opencl_c_base_h = custom_target(
command : [prog_python, '@INPUT@', '@OUTPUT@', '-n', 'opencl_c_base_source'],
)
+_libclc_sources = [opencl_c_base_h]
+if dep_llvm.version().version_compare('< 15.0')
+ _libclc_sources += [opencl_c_h]
+endif
+
files_libclc = files(
'clc.c',
'clc_helpers.cpp',
@@ -55,8 +60,7 @@ endif
_libclc = static_library(
'libclc',
files_libclc,
- opencl_c_h,
- opencl_c_base_h,
+ sources: _libclc_sources,
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_compiler, inc_spirv],
cpp_args : _libclc_cpp_args,
dependencies: [idep_nir_headers, dep_clang, dep_llvm, dep_llvmspirvlib,
More information about the mesa-commit
mailing list