compiler/clc: Rename the internal library from libclc to libmesaclc

There is an actual external libclc and we do use it, so rename the
internal common library to avoid confusion.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Nora Allen <blackcatgames@protonmail.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23667>
This commit is contained in:
Caio Oliveira
2023-06-14 23:42:24 -07:00
committed by Marge Bot
parent 0c387249e1
commit be3e4c8aaf
4 changed files with 17 additions and 17 deletions

View File

@@ -20,13 +20,13 @@
# IN THE SOFTWARE. # IN THE SOFTWARE.
files_libclc = files( files_libmesaclc = files(
'clc.c', 'clc.c',
'clc_helpers.cpp', 'clc_helpers.cpp',
) )
_libclc_cpp_args = ['-DLLVM_LIB_DIR="@0@"'.format(llvm_libdir)] _libmesaclc_cpp_args = ['-DLLVM_LIB_DIR="@0@"'.format(llvm_libdir)]
_libclc_sources = [] _libmesaclc_sources = []
if get_option('opencl-external-clang-headers') \ if get_option('opencl-external-clang-headers') \
.disable_auto_if(host_machine.system() == 'windows') \ .disable_auto_if(host_machine.system() == 'windows') \
@@ -57,30 +57,30 @@ if get_option('opencl-external-clang-headers') \
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] _libmesaclc_sources += [opencl_c_base_h]
if dep_llvm.version().version_compare('< 15.0') if dep_llvm.version().version_compare('< 15.0')
_libclc_sources += [opencl_c_h] _libmesaclc_sources += [opencl_c_h]
endif endif
_libclc_cpp_args += ['-DUSE_STATIC_OPENCL_C_H=1'] _libmesaclc_cpp_args += ['-DUSE_STATIC_OPENCL_C_H=1']
endif endif
# Supported added for SPIRV 1.4 in a version that required LLVM 14. # Supported added for SPIRV 1.4 in a version that required LLVM 14.
if dep_llvm.version().version_compare('>= 14.0') if dep_llvm.version().version_compare('>= 14.0')
_libclc_cpp_args += ['-DHAS_SPIRV_1_4=1'] _libmesaclc_cpp_args += ['-DHAS_SPIRV_1_4=1']
endif endif
_libclc = static_library( _libmesaclc = static_library(
'libclc', 'libmesaclc',
files_libclc, files_libmesaclc,
sources: _libclc_sources, sources: _libmesaclc_sources,
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 : _libmesaclc_cpp_args,
dependencies: [idep_nir_headers, dep_clang, dep_llvm, dep_llvmspirvlib, dependencies: [idep_nir_headers, dep_clang, dep_llvm, dep_llvmspirvlib,
idep_mesautil, idep_nir, dep_spirv_tools] idep_mesautil, idep_nir, dep_spirv_tools]
) )
idep_clc = declare_dependency( idep_mesaclc = declare_dependency(
link_with : _libclc, link_with : _libmesaclc,
include_directories : include_directories('.'), include_directories : include_directories('.'),
) )

View File

@@ -285,7 +285,7 @@ libmesa_rust_gen = static_library(
libgallium, libgallium,
], ],
dependencies: [ dependencies: [
idep_clc, idep_mesaclc,
], ],
rust_crate_type : 'rlib', rust_crate_type : 'rlib',
rust_args : [ rust_args : [

View File

@@ -177,7 +177,7 @@ if with_intel_clc
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel],
c_args : [pre_args, no_override_init_args], c_args : [pre_args, no_override_init_args],
link_args : [ld_args_build_id], link_args : [ld_args_build_id],
dependencies : [idep_nir, idep_clc, idep_mesautil, idep_intel_dev], dependencies : [idep_nir, idep_mesaclc, idep_mesautil, idep_intel_dev],
native : true, native : true,
) )
endif endif

View File

@@ -29,7 +29,7 @@ libclc_compiler = shared_library(
[files_libclc_compiler, sha1_h], [files_libclc_compiler, sha1_h],
vs_module_defs : 'clon12compiler.def', vs_module_defs : 'clon12compiler.def',
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_compiler, inc_gallium, inc_spirv], include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_compiler, inc_gallium, inc_spirv],
dependencies: [idep_clc, idep_nir_headers, dep_version, idep_mesautil, dependencies: [idep_mesaclc, idep_nir_headers, dep_version, idep_mesautil,
idep_libdxil_compiler, idep_nir], idep_libdxil_compiler, idep_nir],
name_prefix : '' # otherwise mingw will create libclon12compiler.dll name_prefix : '' # otherwise mingw will create libclon12compiler.dll
) )