mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
clc: generate sources only with with_microsoft_clc
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19617>
This commit is contained in:
parent
5d025f4003
commit
cd2609b12c
1 changed files with 23 additions and 21 deletions
|
|
@ -21,34 +21,36 @@
|
|||
|
||||
clang_resource_dir = join_paths(llvm_libdir, 'clang', dep_llvm.version(), 'include')
|
||||
|
||||
if dep_llvm.version().version_compare('< 15.0')
|
||||
opencl_c_h = custom_target(
|
||||
'opencl-c.h',
|
||||
input : [files_xxd, join_paths(clang_resource_dir, 'opencl-c.h')],
|
||||
output : 'opencl-c.h.h',
|
||||
command : [prog_python, '@INPUT@', '@OUTPUT@', '-n', 'opencl_c_source'],
|
||||
)
|
||||
endif
|
||||
|
||||
opencl_c_base_h = custom_target(
|
||||
'opencl-c-base.h',
|
||||
input : [files_xxd, join_paths(clang_resource_dir, 'opencl-c-base.h')],
|
||||
output : 'opencl-c-base.h.h',
|
||||
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',
|
||||
)
|
||||
|
||||
_libclc_cpp_args = ['-DCLANG_RESOURCE_DIR="@0@"'.format(clang_resource_dir)]
|
||||
_libclc_sources = []
|
||||
|
||||
if with_microsoft_clc
|
||||
if dep_llvm.version().version_compare('< 15.0')
|
||||
opencl_c_h = custom_target(
|
||||
'opencl-c.h',
|
||||
input : [files_xxd, join_paths(clang_resource_dir, 'opencl-c.h')],
|
||||
output : 'opencl-c.h.h',
|
||||
command : [prog_python, '@INPUT@', '@OUTPUT@', '-n', 'opencl_c_source'],
|
||||
)
|
||||
endif
|
||||
|
||||
opencl_c_base_h = custom_target(
|
||||
'opencl-c-base.h',
|
||||
input : [files_xxd, join_paths(clang_resource_dir, 'opencl-c-base.h')],
|
||||
output : 'opencl-c-base.h.h',
|
||||
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
|
||||
|
||||
_libclc_cpp_args += ['-DUSE_STATIC_OPENCL_C_H=1']
|
||||
endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue