1# Copyright © 2017 Intel Corporation 2 3# Permission is hereby granted, free of charge, to any person obtaining a copy 4# of this software and associated documentation files (the "Software"), to deal 5# in the Software without restriction, including without limitation the rights 6# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7# copies of the Software, and to permit persons to whom the Software is 8# furnished to do so, subject to the following conditions: 9 10# The above copyright notice and this permission notice shall be included in 11# all copies or substantial portions of the Software. 12 13# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19# SOFTWARE. 20 21opencl_version = '1' 22 23rusticl_ld_args = [] 24rusticl_ld_depends = [] 25 26if with_ld_version_script 27 rusticl_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'rusticl.sym')] 28 rusticl_ld_depends += files('rusticl.sym') 29endif 30 31librusticl = shared_library( 32 'RusticlOpenCL', 33 'target.c', 34 gnu_symbol_visibility : 'hidden', 35 include_directories : [ 36 inc_include, 37 inc_src, 38 inc_gallium, 39 inc_gallium_aux, 40 inc_gallium_drivers, 41 inc_gallium_winsys, 42 ], 43 link_whole : librusticl, 44 link_with : [ 45 libpipe_loader_static, 46 libswdri, 47 libswkmsdri, 48 libwsw, 49 libws_null, 50 ], 51 dependencies : [ 52 driver_asahi, 53 driver_iris, 54 driver_nouveau, 55 driver_r600, 56 driver_panfrost, 57 driver_radeonsi, 58 driver_swrast, 59 driver_zink, 60 idep_nir, 61 idep_vtn, 62 ], 63 link_args : [ 64 ld_args_build_id, 65 ld_args_gc_sections, 66 rusticl_ld_args, 67 ], 68 link_depends : rusticl_ld_depends, 69 version : '@0@.0.0'.format(opencl_version), 70 install : true, 71) 72 73_config = configuration_data() 74_config.set('OPENCL_VERSION', opencl_version) 75configure_file( 76 configuration : _config, 77 input : 'rusticl.icd.in', 78 output : 'rusticl.icd', 79 install : true, 80 install_tag : 'runtime', 81 install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'), 82) 83 84# .so is hardcoded in the icd as well 85devenv.prepend( 86 'OCL_ICD_VENDORS', 87 meson.current_build_dir() / 'libRusticlOpenCL.so.@0@'.format(opencl_version) 88) 89