Path: blob/21.2-virgl/src/gallium/frontends/clover/meson.build
4565 views
# Copyright © 2017-2018 Intel Corporation12# Permission is hereby granted, free of charge, to any person obtaining a copy3# of this software and associated documentation files (the "Software"), to deal4# in the Software without restriction, including without limitation the rights5# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell6# copies of the Software, and to permit persons to whom the Software is7# furnished to do so, subject to the following conditions:89# The above copyright notice and this permission notice shall be included in10# all copies or substantial portions of the Software.1112# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR13# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,14# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE15# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER16# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,17# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE18# SOFTWARE.1920clover_cpp_args = []21clover_opencl_cpp_args = [22'-DCL_TARGET_OPENCL_VERSION=300',23'-DCL_USE_DEPRECATED_OPENCL_1_0_APIS',24'-DCL_USE_DEPRECATED_OPENCL_1_1_APIS',25'-DCL_USE_DEPRECATED_OPENCL_1_2_APIS',26'-DCL_USE_DEPRECATED_OPENCL_2_0_APIS',27'-DCL_USE_DEPRECATED_OPENCL_2_1_APIS',28'-DCL_USE_DEPRECATED_OPENCL_2_2_APIS',29'-DLIBCLC_INCLUDEDIR="@0@/"'.format(dep_clc.get_variable(pkgconfig : 'includedir')),30'-DLIBCLC_LIBEXECDIR="@0@/"'.format(dep_clc.get_variable(pkgconfig : 'libexecdir'))31]32clover_spirv_cpp_args = []33clover_incs = [inc_include, inc_src, inc_gallium, inc_gallium_aux]3435# the CL header files declare attributes on the CL types. Compilers warn if36# we use them as template arguments. Disable the warning as there isn't37# anything we can do about it38if cpp.has_argument('-Wno-ignored-attributes')39clover_cpp_args += '-Wno-ignored-attributes'40endif4142if with_opencl_icd43clover_cpp_args += '-DHAVE_CLOVER_ICD'44endif4546if with_opencl_native47clover_spirv_cpp_args += '-DHAVE_CLOVER_NATIVE'48endif4950if with_opencl_spirv51clover_spirv_cpp_args += '-DHAVE_CLOVER_SPIRV'52endif5354libclllvm = static_library(55'clllvm',56files(57'llvm/codegen/bitcode.cpp',58'llvm/codegen/common.cpp',59'llvm/codegen/native.cpp',60'llvm/codegen.hpp',61'llvm/compat.hpp',62'llvm/invocation.cpp',63'llvm/invocation.hpp',64'llvm/metadata.hpp',65'llvm/util.hpp',66),67include_directories : clover_incs,68cpp_args : [69clover_cpp_args,70clover_opencl_cpp_args,71clover_spirv_cpp_args,72'-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths(73dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir'), 'clang',74dep_llvm.version(), 'include',75)),76],77gnu_symbol_visibility : 'hidden',78dependencies : [dep_llvm, dep_elf, dep_llvmspirvlib, idep_mesautil],79)8081libclspirv = static_library(82'clspirv',83files('spirv/invocation.cpp', 'spirv/invocation.hpp'),84include_directories : clover_incs,85cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args],86gnu_symbol_visibility : 'hidden',87dependencies : [dep_spirv_tools, idep_mesautil],88)8990libclnir = static_library(91'clnir',92files('nir/invocation.cpp', 'nir/invocation.hpp'),93include_directories : [clover_incs, inc_mesa],94dependencies : idep_nir,95cpp_args : [clover_opencl_cpp_args, clover_spirv_cpp_args],96gnu_symbol_visibility : 'hidden',97)9899clover_files = files(100'api/context.cpp',101'api/device.cpp',102'api/dispatch.cpp',103'api/dispatch.hpp',104'api/event.cpp',105'api/interop.cpp',106'api/invalid.cpp',107'api/kernel.cpp',108'api/memory.cpp',109'api/platform.cpp',110'api/program.cpp',111'api/queue.cpp',112'api/sampler.cpp',113'api/transfer.cpp',114'api/util.hpp',115'core/compiler.hpp',116'core/context.cpp',117'core/context.hpp',118'core/device.cpp',119'core/device.hpp',120'core/error.hpp',121'core/event.cpp',122'core/event.hpp',123'core/format.cpp',124'core/format.hpp',125'core/kernel.cpp',126'core/kernel.hpp',127'core/memory.cpp',128'core/memory.hpp',129'core/module.cpp',130'core/module.hpp',131'core/object.hpp',132'core/platform.cpp',133'core/platform.hpp',134'core/printf.cpp',135'core/printf.hpp',136'core/program.cpp',137'core/program.hpp',138'core/property.hpp',139'core/queue.cpp',140'core/queue.hpp',141'core/resource.cpp',142'core/resource.hpp',143'core/sampler.cpp',144'core/sampler.hpp',145'core/timestamp.cpp',146'core/timestamp.hpp',147'util/adaptor.hpp',148'util/algebra.hpp',149'util/algorithm.hpp',150'util/factor.hpp',151'util/functional.hpp',152'util/lazy.hpp',153'util/pointer.hpp',154'util/range.hpp',155'util/tuple.hpp',156)157158libclover = static_library(159'clover',160[clover_files, sha1_h],161include_directories : clover_incs,162cpp_args : [163clover_opencl_cpp_args,164clover_spirv_cpp_args,165clover_cpp_args,166],167gnu_symbol_visibility : 'hidden',168link_with : [libclllvm, libclspirv, libclnir],169dependencies : idep_mesautil,170)171172173