mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 13:30:12 +01:00
clc: Fix build with llvm-15.
opencl_c_h is defined only for llvm < 15.
Fixes: bcc2df4890 ("clc: speed up compilation by not relying on opencl-c.h")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16808>
This commit is contained in:
parent
4b3afed35a
commit
3e679219a1
1 changed files with 6 additions and 2 deletions
|
|
@ -37,6 +37,11 @@ opencl_c_base_h = custom_target(
|
||||||
command : [prog_python, '@INPUT@', '@OUTPUT@', '-n', 'opencl_c_base_source'],
|
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(
|
files_libclc = files(
|
||||||
'clc.c',
|
'clc.c',
|
||||||
'clc_helpers.cpp',
|
'clc_helpers.cpp',
|
||||||
|
|
@ -55,8 +60,7 @@ endif
|
||||||
_libclc = static_library(
|
_libclc = static_library(
|
||||||
'libclc',
|
'libclc',
|
||||||
files_libclc,
|
files_libclc,
|
||||||
opencl_c_h,
|
sources: _libclc_sources,
|
||||||
opencl_c_base_h,
|
|
||||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_compiler, inc_spirv],
|
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_compiler, inc_spirv],
|
||||||
cpp_args : _libclc_cpp_args,
|
cpp_args : _libclc_cpp_args,
|
||||||
dependencies: [idep_nir_headers, dep_clang, dep_llvm, dep_llvmspirvlib,
|
dependencies: [idep_nir_headers, dep_clang, dep_llvm, dep_llvmspirvlib,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue