From 3e679219a110ecff858ef7cc94d01a7df17e884c Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 31 May 2022 21:24:15 -0700 Subject: [PATCH] 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 Reviewed-by: Jesse Natalie Reviewed-by: Karol Herbst Part-of: --- 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,