mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 18:10:17 +01:00
clover: Only compile/depend libclspirv and libclnir when using SPIR-V support
Reviewed-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25341>
This commit is contained in:
parent
3a210932ad
commit
4e065cdaaa
1 changed files with 26 additions and 18 deletions
|
|
@ -75,23 +75,31 @@ libclllvm = static_library(
|
|||
dependencies : [dep_llvm, dep_elf, dep_llvmspirvlib, idep_mesautil],
|
||||
)
|
||||
|
||||
libclspirv = static_library(
|
||||
'clspirv',
|
||||
files('spirv/invocation.cpp', 'spirv/invocation.hpp'),
|
||||
include_directories : clover_incs,
|
||||
cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_spirv_tools, idep_mesautil],
|
||||
)
|
||||
idep_opencl_spirv = null_dep
|
||||
if with_opencl_spirv
|
||||
libclspirv = static_library(
|
||||
'clspirv',
|
||||
files('spirv/invocation.cpp', 'spirv/invocation.hpp'),
|
||||
include_directories : clover_incs,
|
||||
cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_spirv_tools, idep_mesautil],
|
||||
)
|
||||
|
||||
libclnir = static_library(
|
||||
'clnir',
|
||||
files('nir/invocation.cpp', 'nir/invocation.hpp'),
|
||||
include_directories : [clover_incs, inc_mesa],
|
||||
dependencies : [idep_nir, idep_vtn, idep_mesaclc],
|
||||
cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
)
|
||||
libclnir = static_library(
|
||||
'clnir',
|
||||
files('nir/invocation.cpp', 'nir/invocation.hpp'),
|
||||
include_directories : [clover_incs, inc_mesa],
|
||||
dependencies : [idep_nir, idep_vtn, idep_mesaclc],
|
||||
cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
)
|
||||
|
||||
idep_opencl_spirv = declare_dependency(
|
||||
dependencies : [idep_nir],
|
||||
link_with : [libclspirv, libclnir],
|
||||
)
|
||||
endif
|
||||
|
||||
clover_files = files(
|
||||
'api/context.cpp',
|
||||
|
|
@ -163,6 +171,6 @@ libclover = static_library(
|
|||
clover_cpp_args,
|
||||
],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
link_with : [libclllvm, libclspirv, libclnir],
|
||||
dependencies : [idep_mesautil, idep_nir],
|
||||
link_with : [libclllvm],
|
||||
dependencies : [idep_mesautil, idep_nir, idep_opencl_spirv],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue